| | |
String
Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved |
hi everyone
i have a very a very basic question in mind .. i wanted to discuss ..
Difference Between these?
String s1= new String("java") ;
String s2="java" ;
and also
what for 2 different classes are there in garbage collection?
System.gc and runtime.gc ( both are doing the same job)
what is their individual role?
please anyone explain me....
i have a very a very basic question in mind .. i wanted to discuss ..
Difference Between these?
String s1= new String("java") ;
String s2="java" ;
and also
what for 2 different classes are there in garbage collection?
System.gc and runtime.gc ( both are doing the same job)
what is their individual role?
please anyone explain me....
Adios,
Vinod......
Vinod......
•
•
•
•
hi everyone
i have a very a very basic question in mind .. i wanted to discuss ..
Difference Between these?
String s1= new String("java") ;
String s2="java" ;
new String("java") constructor, you will actually get a new copy of the String "java", not the reference from the String pool. The following fragment of code will demonstrate this Java Syntax (Toggle Plain Text)
String a = "java"; String b = new String("java"); String c = "java"; System.out.println("a==b : "+(a==b)); // false System.out.println("a.equals(b) : "+(a.equals(b))); // true System.out.println("a==c : "+(a==c)); //true
•
•
•
•
what for 2 different classes are there in garbage collection?
System.gc and runtime.gc ( both are doing the same job)
what is their individual role?
please anyone explain me....
•
•
•
•
The call System.gc() is effectively equivalent to the call:
Runtime.getRuntime().gc()
The method System.gc() is the conventional and convenient means of invoking this method.
![]() |
Similar Threads
Other Threads in the Java Forum
- Previous Thread: MasterMind novice
- Next Thread: Java home work help (long post)
Views: 850 | Replies: 2
| Thread Tools | Search this Thread |
Tag cloud for Java
3d @param affinetransform android api apple applet application arc arguments array arrays automation binary bluetooth byte c# chat class classes click client code color compare component corrupted database detection draw eclipse error event exception file fractal game givemetehcodez graphics gui guitesting helpwithhomework html ide image input integer j2me java java.xls javaprojects jmf jni jpanel julia keytool keyword linux list loop map method methods mobile netbeans newbie number object oracle pong print problem producer program programming project projectideas read recursion reflection rim scanner screen server set size sms socket sort sql string swing terminal test threads time transfer tree web windows






