0% found this document useful (0 votes)
35 views

Java Quizzz

The document contains 20 multiple choice questions about Java concepts. It provides the correct answer and a brief explanation for each question. Some of the concepts covered include the original name of Java, the Java mascot, differences between primitives and wrapper classes, exceptions, and features of the Java Virtual Machine like HotSpot and serialization.

Uploaded by

RAju RAaju
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views

Java Quizzz

The document contains 20 multiple choice questions about Java concepts. It provides the correct answer and a brief explanation for each question. Some of the concepts covered include the original name of Java, the Java mascot, differences between primitives and wrapper classes, exceptions, and features of the Java Virtual Machine like HotSpot and serialization.

Uploaded by

RAju RAaju
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

1

What was the original name of Java? Oak


- Explanation

Oak was the original name. JavaScript stole its name from Java. James Gosling created Java, and Lisp was just one of the inspirations.

2
What is the name of the Java mascot?

Duke

- Explanation

Duke is the name. Jonathan and Whit no longer work for Sun/Oracle.

3
What is not true about JavaBeans?

They're fully compiled to native code.

- Explanation

JavaBeans are intended to be passed around as Java objects and accessed by methods that can be discovered by tools. They aren't normally compiled to native code unless the JVM does it during execution.

4
Which languages also run on the JVM? All of above
- Explanation

All of them run on the JVM.

5
Which is not an official edition? BE
- Explanation

EE=Enterprise Edition, ME=Micro Edition, and SE=Standard Edition.

6
Which is never true for all possible values of x? (x===x)
- Explanation

Java doesn't have the triple-equals-sign operator. That's JavaScript.

7
JavaFX is: A language for building browser-based content
- Explanation

JavaFX works like Flash and is meant to offer nice, antialiasing in the browser, among other things.

8
OpenJDK is not:

An open source tool for running Java in your browser or through Web Start

- Explanation

The OpenJDK is a GPL-protected stack of code that includes a virtual machine and many Java APIs. It is not normally used to run Java in your browser -- unless you take advantage of the open source license to create a browser plug-in, as some have done.

9
Which of the following class names conforms with Java's standard class-naming convention?

MyClass

- Explanation

The first letter should be uppercase, there should be no spaces, and every subsequent word should be capitalized.

10
What does the letter "E" do when you create an interface with a generic specification like this: public void interface List(){ }

"E" is a placeholder for the type.

- Explanation

Java generics use the E as a placeholder for the type. It has nothing to do with the arithmetic or the code writer's name, although it might be a good idea to tag each method with the name of the person who last wrote it.

11
Swing is to AWT as: nio is to io
- Explanation

Swing is a newer version of AWT, and the nio classes are a newer version of the original io classes.

12

Which is not part of the Java EE 6 platform?

JavaFX

- Explanation

All are part of the platform except JavaFX.

13
The Serialization API was created as: A technique for converting objects to a well-defined sequence of bytes
- Explanation

The Serialization API turns Java objects into a stream of bytes. It's used frequently by JavaBeans and many cross-machine tools.

14
Java Web Start is:

A set of tools for starting up JAR files directly from Web pages

- Explanation

You can use Java Web Start to distribute JAR files from your website.

15
Java Hot Spot is:

A just-in-time compiler that lets the JVM optimize byte code

- Explanation

The Hot Spot is a faster JVM known for optimizing the way that byte code is turned into machine code.

16
Which platform doesn't run Java out of the box?

PC

- Explanation

PCs often need Java installed. Kindle, Android, and Blu-ray run operating systems largely written in Java.

17
What is the difference between an int and an Integer? One is a primitive represented with four bytes, and the other is an object.
- Explanation

The Integer object wraps an int primitive type as an object.

18
The Collection interface is used: To have a standard interface for different ways to store collections of objects
- Explanation

There are a number of Collection classes like Maps or Lists.

19
Which is not true of a Java exception? Exceptions can only jump over three blocks in order to make code easier to debug.
- Explanation

Exceptions can jump up any number of stack frames to reach a catch statement.

20
The Java sandbox: Controls which classes run with the ClassLoader object
- Explanation

The Java sandbox relies on the ClassLoader (and other objects) to make sure that the byte code is clean.

You might also like