• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Dead Code

 
Saibabaa Pragada
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, This is from examLab. Why am I getting Dead Code warning instead of compiler error.
 
Trishul P Mukherjee
Greenhorn
Posts: 17
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please correct me if I'm wrong but I'm not sure if this code is giving any error.
Tested with Eclipse 3.4 and JDK 1.6.0_17 - the compiler isn't showing any errors. Also, the output is 3 - as expected.
 
Saibabaa Pragada
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Trishul, As mentioned there are no errors. It is all about warnings. My question is, Why warning is coming instead of an error. I am expecting error at Line 23 but I am getting only warning.
 
Arjun Srivastava
Ranch Hand
Posts: 432
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
IMHO This Thread will be helpfull for you.
 
Devaka Cooray
ExamLab Creator
Marshal
Pie
Posts: 4594
302
Chrome Eclipse IDE Google App Engine IntelliJ IDE jQuery Postgres Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Phunsuk Wangdu", please check your private messages for an important administrative matter.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic