Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Mock Exam Quest

 
Harry Singh
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
HOw will JVM behave when we code something like this? I know if i uncomment this line then it will give compile time error as then the initialization statement will reduce to
char a = ;
So the compiler yells.. but now as as this statement is commented So why the compiler still complains. As per my understanding, anything within comments will not be looked upon by JVM and i may write or do anything withing comments ?Am i right?

Regards,
Harjinder
 
Pradeep bhatt
Ranch Hand
Posts: 8927
Firefox Browser Java Spring
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic