由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Java版 - help-- a beginner's question
相关主题
RSAHelp: J2EE beginner Deploy problem
NullPointerException 问题sun jc2 or netbeans4.1 which is better?
弱问:System.out.println( Math.sqrt( 4 ) ); 输出2.0。如果要出整数2,该怎么写?Core Java这本书适合初学者嘛?
Re: print problem, GUI guru please come incloud computing discussion
extending generic class , but not mentioning its parameterized type?Please recommend a good book for Java beginner to advanced level quickly. Thanks.
Re: Pls recommand a Java book for beginner!java beginner question
[转载] 请推荐关于Servlet和JSP编程的书java或者python怎么样入门比较快?
Please HelpRe: 初级问题
相关话题的讨论汇总
话题: better话题: public话题: class话题: beginner话题: short
进入Java版参与讨论
1 (共1页)
f******g
发帖数: 423
1
The following is a class I wrote.
It is a child of the class java.math.BigInteger
*************************************
// class better.java
import java.math.BigInteger;
import java.util.Random;
public class Better extends BigInteger
{
String str;
public Better(short s) {

}
public Better(int i) {

}
public Better(long l) {

}
public Better(Short S) {

}
public Better(Integer I) {

}
public Better(Long L) {

}
}
*******
g*****g
发帖数: 34805
2

Do something like below for each constructor, I am too lazy to
explain. By the way, I would only keep Better(long) if I were you.
super(new Short(s).toString());


【在 f******g 的大作中提到】
: The following is a class I wrote.
: It is a child of the class java.math.BigInteger
: *************************************
: // class better.java
: import java.math.BigInteger;
: import java.util.Random;
: public class Better extends BigInteger
: {
: String str;
: public Better(short s) {

1 (共1页)
进入Java版参与讨论
相关主题
Re: 初级问题extending generic class , but not mentioning its parameterized type?
Re: abstract classes GRAPHICSRe: Pls recommand a Java book for beginner!
这道题该走什么路[转载] 请推荐关于Servlet和JSP编程的书
Re: 如何在两个窗口之间通信?Please Help
RSAHelp: J2EE beginner Deploy problem
NullPointerException 问题sun jc2 or netbeans4.1 which is better?
弱问:System.out.println( Math.sqrt( 4 ) ); 输出2.0。如果要出整数2,该怎么写?Core Java这本书适合初学者嘛?
Re: print problem, GUI guru please come incloud computing discussion
相关话题的讨论汇总
话题: better话题: public话题: class话题: beginner话题: short