September 13, 2007 at 12:49 pm (Uncategorized)

2.1
1.What is the portable program>

The portable program is the yields programs that can be run for different types of computer and doesnt change.

2.Describe two features of Java that make it a better language than C++

Java is less error prone, more portable.

3.What is a thread? Describe how threads might be used in a program.

It is a process that can tun concurrently with other process. The book example is a single Java application might consist of two therads, one of them transfers an image from one machine to another across a network, the other one simultaneously interacts with the use.

2.2
1.What is the JVM stand for?

Java virtal machine

2.What is byte code? Describe how the JVM uses tyte code.

The kind of object code generated by a java comiler and interpreted by a Java virtual machine. Byte code is platform independent. Some JVMs translate byte code instructions into machine language when they are first encountered, so next time the instructio is encountered it is executed as fast machine code tater taht being interpreted as slow byte code.

3. What is an applet? Describe how applets are used.

A Java program that can be run on or downloaded on a Web browser. Applets range from the decorative to the practical.

2.4
1. Give a short definition of “program.”

A set of instruction that tells the machine what to do.

2.What is the effect of the message println?

A system.out object respondsto a println message by pinting a string of characters in the terminal window.