Java - : Google's Android Os Media Players Antivirus Web App Desktop App Etc
Java - : Google's Android Os Media Players Antivirus Web App Desktop App Etc
released (renamed as java) year 1995 More than 3 billion devices run java
jdk - java development kit google's android
ide - integrated development environment
os
JVM (Java Virtual Machine)
JRE (Java Runtime Environment) media players
antivirus
java/oak
web app
James Gosling, Mike Sheridan, Patrick Naughton
desktop app
(june 1991)
etc
Java has a huge community
Object-oriented programming - Java is an
object-oriented language. This helps to make Every program in Java must have a class.
our Java code more flexible and reusable.
Every Java program starts from the main
method.
Starting piont for all Java Progam is - MAIN
public - anyone can acces
static - method can be run without creating
an instance of the class containing the
main method
void - method doesn't return any value
main - the name of the method
println method prints a line of text to the
screen.
System class and its out stream are used to
access the println method.
Java is a high level, modern programming
language designed in the early 1990s by
Sun Microsystems, and currently owned by
Oracle.
java syntax java variable
// This is a single-line comment Create a variable named carName and assign
the value Volvo to it.
/* This is a multi-line comment */
String carName = "Volvo";
Note that Java does not support nested multi-
line comments. create a variable named maxSpeed and assign
the value 120
However, you can nest single-line comments
int maxSpeed = 120;
within multi-line comments.
Display the sum of 5 + 10, using two variables: x
and y.
Another name for a Multi-Line comment is a
int x = 5;
Block comment.
int y = 10;
System.out.println(x + y);
int x = 5, y = 6, z = 50;
System.out.println(x + y + z);
java data types java operators
int myNum = 9; multiply - * devide - /
float myFloatNum = 8.99f;
char myLetter = 'A';
boolean myBool = false; operator to increase the value of the
String myText = "Hello World"; variable x by 1