This week's book giveaway is in the General Computing forum.
We're giving away four copies of Emmy in the Key of Code and have Aimee Lucido on-line!
See this thread for details.
Win a copy of Emmy in the Key of Code this week in the General Computing forum!
  • 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 ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

Sun certification 310-035

Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all -
I am taking the java certification exam by sun (310-035) in a couple of days. However, I am having a question with regards to the presentation of code in the exam.
If the code sarts from line 1, and does not start with a class declaration then should I consider it as the beginning of the code (in which case the compilation fails)?
1. int a=0;
2. public void foo(){
3. System.out.println("Foo");
4. }
as opposed to
1. public class A{
2. int a=0;
3. public void foo(){
4. System.out.println("Foo");
5. }
Please clarify me.
Chicken Farmer ()
Posts: 1932
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch forjava!
First, and while glad to see your name is so dedicated to the language, it violates our Naming Policy. You need to have both a first and last name, and they must be realistic first and last names. We prefer people to use their own names, but if you aren't comfortable with this, make something up that looks real.
Second, since we have forums specifically for the SCJP exam, I'm moving this post there.
To do a great right, do a little wrong - shakepeare. twisted little ad:
Java file APIs (DOC, XLS, PDF, and many more)
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!