aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes JQ + Question ID :958011966030 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "JQ + Question ID :958011966030" Watch "JQ + Question ID :958011966030" New topic
Author

JQ + Question ID :958011966030

huiying li
Ranch Hand

Joined: Feb 12, 2001
Posts: 68

The answer given is none of the three lines will compile, however, using JDK 1.3, all three did compile and here are the output.

C:\JavaRanch>javac Test34.java
C:\JavaRanch>java Test34
nulltrue
truenull
nullnull
Any thoughts?


SCJP
Subramaniam Venkatesan
Ranch Hand

Joined: Feb 24, 2001
Posts: 48
None of the 3 lines compiled in jdk1.2.2
got these errors

but got truenull or the o/p you mentioned
in these codes
Stevie Kaligis
Ranch Hand

Joined: Feb 04, 2001
Posts: 400
Yes,
I was about to ask the same question,
it suppose to be compiled and run without any problem,
if this topic is related to JDK 1.0 and 1.1, than JQPlus was right,
but for JDK 1.2 and 1.3, it works without any problem.
huiying li
Ranch Hand

Joined: Feb 12, 2001
Posts: 68
Thanks for your replies, hopefully there won't be something ambiguous like this in the real test.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JQ + Question ID :958011966030
 
Similar Threads
Thread Behavour
doubt in method call
How's this possible ????
doubt in kathy sierra question?
println() : question from JQPlus