• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

format question  RSS feed

 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did anybody meet a question like this.
/////////////////////////////////
public class MyClass implements Runnable{
public void run(){
int i = 10 ////mark
System.out.println("i = "+i);
}
}
/////////////////////////////////
does this code compile?
Personally, I think it would compile if there was a semicolon at the marked line, which is the only problem.
In the real exam, will be there any question like this? say a mis-matched ( or {, or semicolon problem? If yes, then I guess I have to pay some attention to the format in every question.
Thank you.
 
Gold Digger
Posts: 7610
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No I don't think syntax question will come up, I've never seen one of those... This would be mean... We are not academists but just Human Java Compilers (as Andre Moo pointed out)
HIH
------------------
Valentin Crettaz
Sun Certified Programmer for Java 2 Platform
 
passwords must contain 14 characters, a number, punctuation, a small bird, a bit of cheese and a tiny ad.
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!