-
Junior Member
Latest version of ClearCase
What is the latest version of ClearCase for file version control.
thank you guys
-
Junior Member
Re: Latest version of ClearCase
Last edited by shyambaishya; 03-12-2008 at 05:16 AM.
-
Junior Member
How to create muliple instance of a SingleTone class?
How to create muliple instance of a SingleTone class?I want to create three instance of a SingleTone class.My code is like this:
class SingleTone{
private static final SingleTone[] obj = new SingleTone[3];
private SingleTone(){
}
public static SingleTone[] getInstance(){
for (int i = 0 ; i<3 ;i++){
obj[i] = new SingleTone();
}
return obj ;
}
void method(){
System.out.println("This is a SingleTone class's method");
}
}
public class MySingleTone {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
for (int i = 0 ; i<3 ;i++){
SingleTone[] o = SingleTone.getInstance();
System.out.println("Object o:" + o[i]);
}
SingleTone[] o = SingleTone.getInstance();
System.out.println("Object o:-->" + o[0]);
}
}
Problem is : when I prints:
//last line
System.out.println("Object o:-->" + o[0]);
Its shows other object reference,How can I make it same.[/QUOTE]
Last edited by shyambaishya; 03-12-2008 at 05:17 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules