Loading Test...

Test: Java Certification Exam

Category: Software

Description: This is a certification exam for the Java programming language

What is recursion?

It is when a function is defined in terms of itself It is when a function is called until a StackOverflowException occurs It means that a function is able to restart after an exception It is a test condition (JUnit) implying that a method's output has passed

Which of the following is a legal method declaration?

public static void doStuff(void input) public protected int doStuff(int input) private synchronized doStuff() public String doStuff(String input)

For performance reasons it is best to synchronize access to all instance variables.

True False

What is a package?

A collection of class files in a jar file A namespace that organizes a set of related classes and interfaces A pre-compiled web application archive (war file) A group of related abstract classes

In order to override a final method, you must declare the method as abstract in the base class.

True False

Java "garbage collection" is performed only when the System.gc() method is called.

True False

The keyword synchronized is:

used to prevent more than one thread from accessing a block of code at a time. used to control thread priority deprecated due to the introduction of ThreadLocal variables only available in Java 5 and higher

The term API stands for:

Abstract Program Improvement Absolute Program Initiative Average Precompilation Interval Application Programming Interface

Java Servlets are exclusively used for:

Interfacing with enterprise systems like PHP Generating heavy-weight graphics objects on the server Providing client applications with dynamic content Initializing applets and returning their graphics context

How do you determine the number of characters in a String

Use the size() method Call the length() method Call toByteArray().length It is not possible

Which of the following statements is true about the reflection API?

There is a sizable performance overhead for using it Only native methods may be used with reflection It will circumvent any security policy at runtime so it must be used carefully It cannot be used to alter member variable access visibility

A constructor is used for:

Incremental garbage collection Lazy loading of runtime resources Importing classes and to declare thread-local variables Initialization of a newly created object

What is the purpose of import statements?

To declare global variables To define 'friendly' classes To assist the compiler in making optimizations To allow the code to refer to classes without a formal prefix

When a JSP is compiled it becomes a:

JSPC Stub class Servlet WAR or EAR deployment

A collection of methods with no implementation is called:

an interface native linking a subclass data encapsulation

The transient keyword is used when a variable should not be written out when a class is serialized.

True False

Which of the following is the most restrictive access modifier:

public private protected final

Java is considered to be a platform-independent language because:

it is compiled into machine specific byte-codes a compiler has been written for it on all platforms it is object-oriented, like C++ it is an interpreted language which is run in a virtual machine

The difference between a method in a JavaBean and other methods is:

There is no difference, they are still just methods Methods in a JavaBean must be declared final Other methods must always be declared private JavaBeans methods take up less space

If you need to store a "map" of objects in a multi-threaded environment you should use java.util.HashMap.

True False

Comments

Anyone preparing for a Java certification must practice mock exams. Java Certification Examgot 500+ practice questions with exam simulator.
Javacertificationexam True Or False Questions Java Java Tests And Quizs Exam Question For Reflection In Java Java Certification Questions(string) Java Certification Quiz Questions On Reflection In Java Tests And Exam On Java Programming Java 5 Certification Test

Javacertificationexam

True Or False Questions

Java

Tests And Quizs Exam

Question

For Reflection In Certification

Questions(string)

Quiz On Programming 5

Test