Meaningless Drivel is fun!*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Need answer to the question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Need answer to the question" Watch "Need answer to the question" New topic
Author

Need answer to the question

gurpeet singh
Ranch Hand

Joined: Apr 04, 2012
Posts: 924
    
    1

consider the following codelistng



what will be the answer

1. 1 2
2. compile time
3. Runtime error.


Please explain ..
John Jai
Bartender

Joined: May 31, 2011
Posts: 1776
Gurpeet,

What happened when you try this code? Did you get any compile time error?

Please read ShowSomeEffort.

If you need explanation on why the error occurs or why it did not work the way you thought it should, you can point that and ask a specific question.
gurpeet singh
Ranch Hand

Joined: Apr 04, 2012
Posts: 924
    
    1

thanks John for the reply. I would surely read the Show Some Efforts and will run the code and repost my question
John Jai
Bartender

Joined: May 31, 2011
Posts: 1776
gurpeet singh wrote:...and repost my question

You are welcome and thanks for showing some effort.

Please also note that re-posting is not necessary as we intend to UseOneThreadPerQuestion.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Need answer to the question
 
Similar Threads
What does "state" mean? (was Please Explain)
shift
Error in right shift operator >>
which lines of code will compile without erroe
Applying >> operator