Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!

Sun Craven

Greenhorn
+ Follow
since Mar 13, 2008
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Sun Craven

I has attended the scjp 5.0 exam on April 22 2008 in agent of prometric in china ,but i can't login www.prometric.com/sun on April 28 2008
I got a alert :"Your login account was not found."
Where can i find the result of my exam?

Thanks && Regards
Sun Craven
I has attended the scjp 5.0 exam on April 22 2008 in agent of prometric in china ,but i can't login www.prometric.com/sun on April 28 2008
I got a alert :"Your login account was not found."
Where can i find the result of my exam?

Thanks && Regards
Sun Craven
13 years ago
I have passed scjp 5.0 with 84% today .Thanks to every vancher here . All vanchera here are kindness.Thank You Very Much.

Sun Craven
[ April 22, 2008: Message edited by: Sun Craven ]
13 years ago
please look at the class modifier.."Default".
Hello every body
I will take my sjcp 1.5 exam in two days.Could some one give me some mock exams? I need it urgently...


Thank You Very Much For Your Kindness.
I think the answer is D.In my opinion,"String s" is not a String Object,here ,s is just a reference to A String.
s = s.toUpperCase();
Does the toUpperCase() method not create a new String Object? some one could tell me why?

Thanks for your reply.
[ April 19, 2008: Message edited by: Sun Craven ]
hi rancher
please tell me how can i inherit a class and an interface with a same signature method but different return type like the below one:



Thanks for your explain
Sun Craven
[ April 17, 2008: Message edited by: Sun Craven ]
please explain why the o/p is "int"? but when i modified the code as new test().method(1); it print "pint"?
class test {
public static void main( String args[] ) {
new test().method((short)1);
}
void method(int... i) {
System.out.println("int");
}
void method(Integer i) {
System.out.println("pint");
}
void method(byte i) {
System.out.println("bite");
}
}
sorry..i made a mistake on the above Bold code .I have corrected it now.
Thanks for your kindness
Sun Craven
[ April 16, 2008: Message edited by: Sun Craven ]
Hi Rajat:
i have got you.Thank you again.
hi anuj :
As i know ,the Wrapper is immutable,that is you can't change the content of instance of a Integer.am i right?
Here is my own code
could some one explain how the code run and what does "A PriorityQueue's elements are ordered either by natural ordering (in which case the elements that are sorted first will be accessed first) or according to a Comparator" mean?
import java.util.*;
public class TestQuence
{
public static void main ( String [] args )
{
Queue q = new PriorityQueue();
q.add( new Integer(3));
q.add(new Integer(1) );
q.add(new Integer(2));

for ( Object o : q )
{
System.out.println(o+ " " + q.size());
}
}
}
And the o/p is:
1 3
3 3
2 3

Thank you Very much..
Sun Craven
[ April 16, 2008: Message edited by: Sun Craven ]
could some one explain why the "final Integer x4 = 8" is not a constant variable?

thanks for your reply
Sun Craven

Yeah .I C.Thank you Jart.
I am careless..
why the following statement is incorrect?
Every wrapper has a public void toString(); method
Thanks
Sun Craven