For a given class, determine if a default constructor will be created and if so state the prototype of that constructor.(Is this referring to the instantiation of an object and which constructor is used or a class with no constructors?)
Identify legal return types for any method given the declarations of all related methods in this or parent classes.(Is this talking about overloading methods?)
Write code that explicitly makes objects eligible for garbage collection.( B b1 = new B(); b1 = null; or something else?)
State the correspondence between index values in the argument array passed to a main method and command line arguments.(Is this referring to the args[] in the main method signature i.e. args[0] is the first argument, args[1] is the second, etc?)
State the effect of using a variable or array element of any kind when no explicit assignment has been made to it.(Does this mean what happens when an array element is empty?)
------------------------------------------------------<br />Sajid Niazi <br />------------------------------------------------------<br />Sun Certified Programmer For Java 2 Platform 1.4<br />Sun Certified Web Component Developer For J2EE Platform<br />IBM Certified Developer - XML and Related Technologies
A default constructor is created when the class has no other constructors available. For example a class MyClass having no explicitly defined constructors will have a default constructor like this : MyClass(){}
Originally posted by Anthony Villanueva:
This code will not compile.
quote:
--------------------------------------------------------------------------------
Identify legal return types for any method given the declarations of all related methods in this or parent classes.(Is this talking about overloading methods?)
--------------------------------------------------------------------------------
It is not only talking about overloading but also overridding.
Originally posted by Matt Kid:
In this case I thought I would be fine with respect to overloading a method however I received a compiler error due to the fact that the methods have the same formal paramters.
Ron Newman - SCJP 1.2 (100%, 7 August 2002)
------------------------------------------------------<br />Sajid Niazi <br />------------------------------------------------------<br />Sun Certified Programmer For Java 2 Platform 1.4<br />Sun Certified Web Component Developer For J2EE Platform<br />IBM Certified Developer - XML and Related Technologies
Don't destroy the earth! That's where I keep all my stuff! Including this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
|