The JavaTM
Tutorial
Start of Tutorial > Start of Trail |
Search
Feedback Form |
Question 1: When you compile a program written in the Java programming language, the compiler converts the human-readable source file into platform-independent code that a Java Virtual Machine can understand. What is this platform-independent code called?
Question 2: Which of the following is not a valid comment:
a.
/** comment */
b./* comment */
c./* comment
d.// comment
Question 3: In The Java Tutorial, what is the URL of the page that describes Khwarazm? (Hint: You can find the answer by going to the home page and clicking on the link to the Search page where you can perform a search.)
Question 4: Answer the following questions:a. What is the highest version number of the Java 2 SDK, Standard Edition, that is available for download (early-access releases included)? (Hint: You can find the answer at http://java.sun.com/j2se/.)
b. What is the highest version number for an SDK that you can download and use in shipping products (that is, not an early-access release)?
c. What is the lowest version number for an SDK that you can download? (Note that "SDK" used to be called "JDK.")
Question 5: Answer the following questions:
a. Which bug has the highest number of votes at the Java Developer Connection? Give the bug number, description, and number of votes. (Hint: Look for the answer at http://developer.java.sun.com/developer/bugParade/.)
b. Does the bug report give a workaround? If so, what is it?
Question 6: What is the first thing you should check if the interpreter returns the error:
Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorldApp.java.
Exercise 1: Change the
HelloWorldApp.java
program so that it displaysHola Mundo!
instead ofHello World!
.
Exercise 2: Download this file:Useless.java
Compile and run this program. What is the output?Exercise 3: You can find a slightly modified version of
HelloWorldApp
here:HelloWorldApp2.java
The program has an error. Fix the error so that the program successfully compiles and runs. What was the error?Exercise 4: Change the height of the
HelloWorld
applet from25
to50
. Describe what the modified applet looks like.Exercise 5: Download the following two source files:
Compile the files, and then run the resulting program. What is the output? If you have trouble compiling the files but have successfully compiled before, try unsetting theCLASSPATH
environment variable, and then compile again.
Start of Tutorial > Start of Trail |
Search
Feedback Form |