Java Database Equivalent to the C++ Database

                                                                       by: Raihan Islam

knowledge of c++ will help you to write Java applications.

Java has 2 stages of compiling: 1. Compilation and 2. interpretation

Advantage of Java: it can run on any machine.

Java is called virtual machine/language because you produce class and then you interpret the class file.

For example: javac ebrahimi.java

if there is no error then the compiler produce ebrahimi.class which is a byte code.

Beside being a virtual machine it can create an applet that can be run on browser. 

*File handling is difficult with java. Scanners is added to java to make it easier to work with.

Does java have pointers ? Ans: NO ! Java also doesn't have multiple inheritance.

*C++ have pointers. A lot of people believe c++ is very difficult.

One advantage of java is that you can make a lot of classes.

page 712-715

What is a database and what are the functions of a database?

There are 2 types of functioning database: 1. Administrative 2. End User.

Add, delete, modify

What is the difference between compiler and the interpreter?

 

"Interpreter

An Interpreter is a program that implements or simulates a virtual machine using the base set of instructions of a programming language as its machine language.

You can also think of an Interpreter as a program that implements a library containing the implementation of the basic instruction set of a programming language in machine language.

An Interpreter reads the statements of a program, analyzes them and then executes them on the virtual machine or calls the corresponding instructions of the library.

        A Compiler is a program that translates code of a programming language in machine code, also called            object code. The object code can be executed directly on the machine where it was compiled."

url: http://www.pasteur.fr/formation/infobio/python/ch05s02.html

interpretive language is slow compared to the compiler because it has to go through loops.

Definition from book. Page 6.

Compiler: immediately converts the entire program to LLL, so that it can be executed later, while the

Interpreter: converts each statement and executes that statement.

5pt assignment: program on page 712-714 Figure 20.39 Simple Java database (run the program)

First step: make the menu with the system.out \

Demo: Java demonstration by Hossain

system.out.println();