Professional Documents
Culture Documents
Objective-C
C++
C
Low-Level
Assembly Language Languages
Machine code
CPU
Writing Source Code
ALGOL 68 Python 3 Lua
PRINT(“HELLO, WORLD!”)
ALGOL 60
BEGIN
DISPLAY (“HELLO, WOLRD!”);
END.
C
#INCLUDE <STUDIO.H>
INT MAIN(VOID)
{
PRINTF(“HELLO, WORLD\N”);
RETURN 0;
}
C#
USING SYSTEM;
CLASS EXAMPLE
{
STATIC VOID MAIN(STRING[] ARGS)
{
CONSOLE.WRITELINE(“HELLO WORLD!”);
}
}
Java
public class Helloworld{
public static void main(String[] args){
System.out.println(“hello, world!”);
}
}
TRANSLATORS
• But whatever we write has to be converted down to machine code before it can
run
• There are two main ways of doing this: what's called compiling the source code and
interpreting the source code.
• Compiler is a piece of code that translates the high level language into machine
language as a whole.
The compiler translates the entire program in one go and then executes it.
• Interpreter also is a piece of code that translates the high level language into machine
language but line by line.
Interpreter takes one statement then translates it and executes it and then takes
another statement.
WHAT HAPPENS
• If you write your source code and then you have a program called a compiler.
It will go through that source code and create a separate file that contains the machine
code.
This end result is sometimes referred to as an executable file.
You can now just run your program, keeping your source code private.
COMPILED INTERPRETED
• JavaScript
• Not Native Mobile Apps for Iphone or Windows
TYPES OF JAVA APPLICATION
• Games
• Mobile Apps
• Cloud Computing(is the internet-based storage for files,
applications, and infrastructure)
• Databases
• Websites
HISTORY OF JAVA
HISTORY OF JAVA
HISTORY OF JAVA
RUNTIME ARCHITECTURE
JVM, JRE AND JDK
• JVM (Java Virtual Machine) is an abstract machine. It is a specification that
provides runtime environment in which java bytecode can be executed.
public This specify the main ( ) is accessible from outside of the class
static This specify that to execute main ( ) even no class objects have been
created
String ar[] String Array data type, species that main takes some arguments
when executed (Note that is no argument specified then Sting array
takes null as the argument, hence no error occurs).
println This is the method which prints the output in the dos command.
KEYWORDS
• The following keywords are reserved in Java, so you must not use them as
class names in your programs
abstract case continue extends goto int package short synchronized try
Break class double float import native public super throws while