Win a copy of Escape Velocity: Better Metrics for Agile Teams this week in the Agile and Other Processes forum!

sunetra sen

Greenhorn
+ Follow
since Oct 15, 2002
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 sunetra sen

can any one help me with clustering with jboss.
any books will be welcome...
19 years ago
Hi,
Thanks all for the help I got during the preparation days.
I didn't have any programing experience but thanks to the mock tests,especially those provided by Dan,Marcus Green and go4java website I could clear the exam with a decent score.
All the best to the other ranchers who are going to take the exam.
Sunetra.
19 years ago
Thanks guys !javascript: x()
Please go through the following code:
public class TerOp{
public static void main(String asd[]){
int x=0;
x=(true) ? x++ : x--;
System.out.println("x= "+x);//1
}
}
It gives the value of x as 0 at line 1.
Can somebody explain why this is so?
Thanks.
PLEASE SEE THE FOLLOWING PROG:
interface C {
char w = DD.echo('w');
char x = DD.echo('x');
}
interface D extends C {
char y = DD.echo('y');
char z = DD.echo('z');
char a = DD.echo(w);
}
class DD implements D {
static char echo(char c) {
System.out.print(c);
return c;
}
public static void main (String[] args) {

System.out.print("Main");
DD dd = new DD();
System.out.println(a);
}
}

IT GIVES OUTPUT AS:
Mainyzwxww
CAN SOMEBODY PLEASE CLARIFY HOW THIS OUTPUT IS OBTAINED.
THANKS.
In case of b=b+3; The expression b+3 is automatically promoted to int before evaluation.So an explicit cast is required to convert back the result of b+3 back from int to byte.
However numeric promotion is not applied in case of += operator.So it compiles fine.
(Refer Mughal pg 44/45).
This is my understanding...am I right?
Please let me know.
Here is a quote from Mughal's book:
"Both narrowing and widening conversions can be either explicit(i.e. requiring a cast) or implicit".(Pg44 Sec 3.3).
Can anyone please explain with some examples?
Thanks.
WELL SORRY TO ALL U JAVAITES!
ACTUALLY I WAS NOT AWARE OF THIS FACT..COZ MANY EXAMS ALLOW THEIR PREVIOUS YEARS QUESTIONS TO BE PUBLISHED.
ANYWAY I THINK THIS TOPIC MAY BE CLOSED NOW.
THANKS.
Hi,
Can you suggest to me anybook/website having a QuestionBank on SCJP2?
Thanks.
hi Johen,
I can assure u that u r not the only one who finds the questions of mughal challenging.I am having the same experience.
I think u shud also go thru some books having wider coverage of the language API's like the Complete Reference or Thinking in Java.
Some Sites for Topic(s) based mock tests:
http://www.jchq.net/
http://deepak.htmlplanet.com/
http://home-1.worldonline.nl/~bmc88/java/javacert/index.html
http://www.code316.com/
http://www.lanw.com/java/javacert/default.htm
If u have some suggestions then let me know.
hi all,
I am new to Java and have to take the SCJP2 test in december.So was just wondering whether any of you have collection of questions asked in the previous SCJP exams.If you do have then will you be kind enough to send those by mail to me.
Thanks.