Free Web Hosting Provider - Web Hosting - E-commerce - High Speed Internet - Free Web Page
Search the Web

anilbachi SCJP Practice Exams

chapter1 | chapter2 | chapter3 | chapter4 | chapter5 | chapter6 |

chapter7 | chapter8 | chapter9 | chapter10 | chapter11 |

chapter 1: Language Fundamentals Questions ( page 1 of 3 )

Page 2 | page 3

Q1: Which of the following are the correct form of documentation comments?

a]. //some text here

b]. /*some text here*/

c]. /**some text here*/

d]. all the above

 

Q2: State the correct formula for minimum/maximum values for integer primitives

where no_of_bits is the size of the type in bits

a] 2^(no_of_bits-1) / 2^(no_of_bits-1)+1

b] 2^(no_of_bits+1) / 2^(no_of_bits+1)+1

c] 2^(no_of_bits-1) / 2^(no_of_bits-1)-1

d] all the above

 

Q3: When you use a web browser to browse the javadoc information for a package, how are the list of classes in that package organized?

a]. according to the class hierarchy

b]. alphabetically by class name

c]. by frequency of use

d]. all the original java1.0 classes comes first, followed by the classes added for the java1.1 and 1.2 releases

 

Q4: Which color is used to indicate instance methods in the standard 'javadoc' format documentation

a]. blue

b]. red

c]. purple

d]. orange

 

Q5: which of the following is the correct way to define a class that will be in the default package

a]. package default;

import java.util.*;

b]. import java.util.*;

package default;

c]. import java.util.*;

d]. all the above

 

Q6: Which of the following main method in a java application is correct?

a]. public static void main(String[] args)

b]. public void main(String args[])

c]. public static void main (string[] args)

d]. final public static void main (String[] args)

e]. static public void main(String x[])

f]. static void main (string[] args)

g]. a and e only.

h]. g and d

Q7: Which of the following is default integer primitive

a]. short

b]. int

c]. byte

d]. char

e]. long

 

Q8: Which of the following integer primitive types can correctly represent a value of 65,000

a]. short

b]. int

c]. byte

d]. long

e]. char

f]. both b and d

g]. a, b and d

 

Q9: Which of the following is not a reserved word in java

a]. import

b]. finally

c]. friend

d]. goto

 

Q10: When writing a utility class, someclass, which extends mainclass class and will be used by several other classes in a large project. These other classes will be in different packages.Pick the correct class declaration.

a]. class someclass extends mainclass

b]. protected class someclass extends mainclass

c]. public class someclass extends mainclass

d]. none

 

Q11: Which of the following variable names are invalid?

a) example

b). 2sumup

c). its4u

d). $money

Page 2 | page 3

 

Click here for solutions

468x60 Animated

 

©Copyrights anilbachi.8m.com All rights reserved

for queries contact anil_kuchana@yahoo.com