Java Quizzz
Java Quizzz
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?
- 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
5
Which is not an official edition? BE
- Explanation
6
Which is never true for all possible values of x? (x===x)
- Explanation
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(){ }
- 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
JavaFX
- Explanation
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:
- 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
18
The Collection interface is used: To have a standard interface for different ways to store collections of objects
- Explanation
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.