File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes exam qs- modifiers and identifiers-help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "exam qs- modifiers and identifiers-help" Watch "exam qs- modifiers and identifiers-help" New topic
Author

exam qs- modifiers and identifiers-help

sarim raza
Ranch Hand

Joined: Nov 02, 2000
Posts: 232
please explain,thanks!
1.valid identifiers ?
A]class
B]$value
C]zer@
^ ^
D]angstrom // seems like some foreign language letters
E]2much

2.Which modifiers and return types would be valid in the declaration of a working main() method for a Java standalone application?
A]Private
B]Final
C]Static
D]Int
E]Abstract

3.Which lines of code are valid declarations of a native method when occurring within the declaration of the following class?
public class Qf575 {
// insert declaration of a native method here
}
A]native public void setT(int kelvin)
B]private native void setT(int K)
C]protected int native getT();
D]public abstract native void setT(int k)
E]native int setT(int k)

4. Which statements concerning the value of a member variable are true, when no explicit assignments have been made?
A]Value of int is undetermined
B]Value of all numeric types is zero
C]Compiler may issue an error if the variable is used before it is iitialized
D]Value of a string variable is "" emty string
E]Value of all object variables is null
5. which of the following are true for a switch statement?
A]all switch statements must have a default label
B]there must be atleast one label for each code segment
C]keyword continue can never occur
D]no case label may follow a default label
E]char literal can be used

Oliver Grass
Ranch Hand

Joined: Nov 02, 2000
Posts: 65
Hi Sarim,
don't get me wrong, but if you try and compile these questions, you will get a lot of answers. For example the questions about the valid identifiers.
Believe me, if you hack this stuff and try it, you will have a greater benefit than just posting these questions and reading the answers...
One more thing. If you really have difficultiest with some questions, be sure, that you post them right. For example question 2, none of these are valid, cause they all start with uppercase letters (i doubt that in the question they started with uppercase letter, rite )
I will have a look at the more complex ones, so be patient, on some of these questions you will get an answer (of course only if i know the solution )
cheers
Oliver
[This message has been edited by Oliver Grass (edited November 10, 2000).]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: exam qs- modifiers and identifiers-help
 
Similar Threads
Question from http://www.danchisholm.net
Section 1 Mock test questions
JLS tips
my notes on JLS for any1 who needs them !!
One more from Khalid