Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

scjp 1.4 mock tests still available?

 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does enthuware provide mock tests for scjp 1.4? When I went to their site ,I could see only 1.5 and 1.6. If not what are the other mock tests available?
 
Ranch Hand
Posts: 201
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i would say that you hurry as SCJP 1.4 won't be available after November 2008.
 
sumi rankan
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yeah ...I know...But I knew it only from the other post in this forum.Thank goodness ..I go through this forum daily and got updated..Thank you all...
 
sumi rankan
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Mr.Bhandari, I just checked out your blog abt order of execution of static and non static blocks...I encountered NoSuchMethodError: main when i tried to run it...when I included the main method in class Foo instead of class Bar, it worked just fine...could get what it meant...Thank you..
But I have a doubt.when i tried running it without creating any instance it just printed foo static.I expected it to print bar static also..Am I wrong?Bear with me .I m a beginner...
 
Sandeep Bhandari
Ranch Hand
Posts: 201
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by sumi rankan:
Hello Mr.Bhandari, I just checked out your blog abt order of execution of static and non static blocks...I encountered NoSuchMethodError: main when i tried to run it...when I included the main method in class Foo instead of class Bar, it worked just fine...could get what it meant...Thank you..
But I have a doubt.when i tried running it without creating any instance it just printed foo static.I expected it to print bar static also..Am I wrong?Bear with me .I m a beginner...




Thanks for bringing out that point. Actually, the Bar class is not public here and hence the file can be named anything and you named it as Foo and tried to run it. As Foo doesn't contain any main method, you got NoSuchMethodError. If you had run the Bar class then it could have run since it contains the main method.

Now coming to the second point about the output you got. You ran the Foo class by adding a main method to it. Since the Foo class doesn't extend any user class (Bar in this case), only Foo class is loaded by JVM and which results in the output "Foo static".

Hope that made it clear. I will updating the same at the blog also.
 
sumi rankan
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you for clearing it up...
 
reply
    Bookmark Topic Watch Topic
  • New Topic