Computer Science 2.03-2.06

¡Supera tus tareas y exámenes ahora con Quizwiz!

What 3 things do you need to write a Java program?

1. A text editor to write Java program source code 2. A compiler to translate source code into bytecode 3. An interpreter to translate and execute bytecode

What are the 3 steps of a Java program? (This counts as 3 questions.)

1. Write the Java source in some text editor. The source code file must end with .java. 2. Translate the source code file with a Java compiler into an intermediate bytecode file that will end with .class. 3. Execute the bytecode file with a Java Virtual Machine (JVM) program, which is an interpreter.

What is an application?

A Java program designed to operate in a stand-alone environment is called an application.

Explain why the United Nations "2-step translation" process requires fewer translators than a "1-step translation" process.

A clever two-step translation process is used. English is selected as an intermediate language. Do not get confused, because English is not the selected universal language for all the delegates. It is an intermediate language. This requires 199 translators who can speak each one of the 199 languages and English.

Can Notepad be used to write a Java program?

A plain-old editor like Notepad is sufficient, and such a text editor comes free with any type of windows environment.

When is a programming language considered to be platform independent?

A programming language is considered platform independent or portable if program source code created on one type of computer platform can execute on another computer platform without any difficulty.

All Java programs end with what suffix?

All Java source programs end with the .java suffix.

All bytecode files end with what suffix?

All bytecode files end with a .class suffix

What is bytecode?

Bytecode is almost machine code, but not quite. Computers cannot execute bytecode. The bytecode file that is created will be identical regardless of where it was created. Bytecode is a low level-level code file that cannot execute as a regular machine code file. Bytecode is understood, and executed, by a Java interpreter, called a Java Virtual Machine (JVM)

Does the computer understand bytecode?

Bytecode is not understood by any computer.

Which program is larger, a compiler or an interpreter?

Compilers are much larger programs than interpreters.

What does HTML stand for?

Hyper Text Markup Language,

Refer to your answer to the previous question. What company bought that company in 2009?

In 2009 Oracle bought Sun Microsystems so the software is actually downloaded from Oracle's website.

Some software packages combine all 3 of these things into an IDE. What does IDE stand for?

Integrated Development Environment

In the textbook, the JDK file name is jdk-7u3-windows-i586.exe. If you download the JDK today, you might notice the file name is a little different. What would this indicate?

It is entirely possible that by the time you are reading this, there might be another update and the file name may be slightly different. The same thing applies for JCreator as well.

What is the name for the interpreter that takes the bytecode and then executes the program?

JVM is the name for the interpreter that takes the bytecode and then executes the program

What does JDK stand for?

Java Development Kit

What does JRE stand for?

Java Runtime Environment

What does JVM stand for?

Java Virtual Machine (JVM)

What type of code is created by a Java compiler?

Java starts by compiling the high-level source code into bytecode.

Refer to the previous question. Java then continues and uses an _______ to translate the _______ into executable _______ line by line

Java then continues and uses an interpreter to translate the bytecode into executable machine code line by line.

What does Java use an interpreter for?

Java uses a compiler to translate programmer's source code into bytecode and then continues with an interpreter to translate and execute the bytecode file line by line.

Java uses a _______ to translate the program source code created by the programmer into _______.

Java uses a compiler to translate the program source code created by the programmer into bytecode.

Can a website be written entirely in Java?

Remember that it is not possible to create an entire website with Java.

What company created Java in 1995?

Sun Microsystems, the company that created Java in 1995.

How much does it cost to download Java from this company?

Sun/Oracle allows you to download this software free of charge, subject to a variety of legal conditions.

Can the Java compiler be accessed from the Command Prompt?

The Java compiler can be accessed at the Command Prompt or DOS Prompt.

To make JCreator function on your computer, you must install both JCreator and the JDK. Which must be installed first?

The point is the JDK must be installed first before JCreator is installed.

What is an applet?

The web page controls the Java bytecode and not the other way around. Now if the bytecode is designed to operate inside a web page it is called an applet, otherwise it is called an application.

If you were to compare the executing of a Java file with the UN, how would "bytecode" fit in with the UN analogy?

Think about the UN. Bytecode is the intermediate English stage. This means that Java compilers need to be available for all the different platforms to create the exact same bytecode for the same source code.

List 2 benefits with using Java on a web page?

With Java it is possible to make web pages dynamic and interact with the user. . With Java it is possible to make web pages dynamic and interact with the user. Regular web pages can look pretty, but it requires some special language like JavaScript, VBScript or Java to provide information to web pages that can be processed. A second benefit is security. Regular HTML web pages do not hide the code. The code used to create the web page can be viewed in the browser.

Can a website contain multiple applets?

You must also understand that a web page can have multiple applets inserted throughout the entire website.


Conjuntos de estudio relacionados

Chapter 9- abdominal vasculature

View Set

Chapter 27. Measuring Domestic Output and National Income

View Set

Module11 Security in Network Design

View Set

Earthquakes and Earth's Interior

View Set

Life and Health Simulation Exam Missed Questions

View Set

CHFI - Chapter 6 (Operating System Forensics)

View Set

A&P Chapter 14: Brain and Cranial Nerves

View Set