| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1076 人关注过本帖
标题:各位大侠 高手 请教一个连环问题!!!!!!!!
只看楼主 加入收藏
77146557
Rank: 1
等 级:新手上路
帖 子:15
专家分:0
注 册:2004-8-12
收藏
 问题点数:0 回复次数:9 
各位大侠 高手 请教一个连环问题!!!!!!!!

1. 编写一个Sa,当输入“Good”,屏幕显示为“好”,当输入为“Bad”时,屏幕显示为“坏”。

2. 将上题改写为通过构造函数实现,在类Sb中调用Sa,在屏幕上显示上题结果。

3. 若第二题中,Sa类在包mypackage.jifa包中,而类sb不在此包中,则程序应做怎样修改。

不好意思啊 是请教一下!

[此贴子已经被作者于2004-09-03 16:18:00编辑过]

搜索更多相关主题的帖子: 连环 屏幕 
2004-09-01 21:48
tailys
Rank: 1
等 级:新手上路
帖 子:21
专家分:0
注 册:2004-8-16
收藏
得分:0 
你是考大家问题呢,还是向大家请教问题呢?什么也没有把问题放下就走,哪个有心去答你
2004-09-02 02:56
77146557
Rank: 1
等 级:新手上路
帖 子:15
专家分:0
注 册:2004-8-12
收藏
得分:0 
就帮忙 帮我做做吧
2004-09-03 21:17
77146557
Rank: 1
等 级:新手上路
帖 子:15
专家分:0
注 册:2004-8-12
收藏
得分:0 

怎么没人哩啊 救人如救火啊

2004-09-05 19:39
Dido
Rank: 1
等 级:新手上路
帖 子:19
专家分:0
注 册:2004-6-22
收藏
得分:0 

我也是初学者

这个问题要想想


/UploadFile/2004-8/200482604536523.gif" border="0" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://bbs./UploadFile/2004-8/200482604536523.gif');}" onmousewheel="return imgzoom(this);" alt="" /> [url]http://holaeurope.[/url] /UploadFile/2004-6/200461618412471.gif" border="0" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open('http://bbs./UploadFile/2004-6/200461618412471.gif');}" onmousewheel="return imgzoom(this);" alt="" /> http://javastudy.
2004-09-05 23:02
77146557
Rank: 1
等 级:新手上路
帖 子:15
专家分:0
注 册:2004-8-12
收藏
得分:0 
谢谢了 朋友
2004-09-05 23:04
Anstey
Rank: 1
等 级:新手上路
帖 子:94
专家分:0
注 册:2004-4-14
收藏
得分:0 

我不明白阿!Sa是什么?Sb又是什么?

:( SORRY


Anstey. Cheers. I love CAPPUCCINO~~
2004-09-06 20:08
Kaking
Rank: 1
等 级:新手上路
帖 子:23
专家分:0
注 册:2004-9-14
收藏
得分:0 

哈哈~~兄弟要学习JAVA我建议还是自己解决这问题,要是应付老师的考试我们到是可以考虑考虑帮你解决的

2004-09-15 17:55
yjm
Rank: 1
等 级:新手上路
帖 子:10
专家分:0
注 册:2004-8-31
收藏
得分:0 

1.public class Sa{ public static void main(String s[]){ String str="good"; String str1="bed"; if(s[0].equals(str)) System.out.println("好"); else if(s[0].equals(str1)) System.out.println("坏");

2**************

public class Sa{ static String strobj; static final String str="good"; static final String str1="bed"; Sa(String s){ strobj=s; } public static void main(String s[]){ Sa one=new Sa(s[0]); if(one.strobj.equals(str)) System.out.println("好"); else if(one.strobj.equals(str1)) System.out.println("坏"); } }

我也是个才鸟,大家学习学习,我有个问题,我的电脑正常关机,但下次开机他老是自检哟,为什么呀????????????????? }}

2004-09-17 23:03
Javaer
Rank: 1
等 级:新手上路
帖 子:18
专家分:0
注 册:2004-10-3
收藏
得分:0 
在Sa中添加package语句以将其放入包中,在Sb中用import语句将Sa导入,具体怎样做,还是查一下书吧.

2004-10-04 00:38
快速回复:各位大侠 高手 请教一个连环问题!!!!!!!!
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.025330 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved