This Edureka "What Is Java" tutorial will help you in understanding the various fundamentals of Java in detail with examples. Below are the topics covered in this tutorial:
1) What is Java?
2) Where is Java used?
3) Features of Java
4) Java Environment
5) How does Java work?
6) Data Types in Java
7) Operators in Java
8) Functions in Java
9) Object Oriented Concepts in Java
2. `
https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING
Agenda For Today
➢ What is Java?
➢ Where is Java used?
➢ Features of Java
➢ Java Environment
➢ How does Java work?
➢ Data Types in Java
➢ Operators in Java
➢ Functions in Java
➢ Object Oriented Concepts in Java
4. `
https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING
What is Java?
➢ Java was created by a team lead by James Gosling in 1995 for Sun Microsystems.
➢ Java is a platform independent programming language that follows the logic of
“Write once, Run anywhere”.
Programming Language Operations Platform
5. `
https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING
What is Java?
January 1996
February 1997
December 1998
May 2000
February 2002
September 2004
December 2006
July 2011
March 2014
Java 1.0
Oak
Java 1.1
Java 1.2
Playground
Java1.3
Kestrel
Java 1.4
Merlin
Java 5 Tiger
Java 6
Mustang
Java 7
Dolphin
Java 8
11. `
https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING
Features of Java
Simple Object-oriented
{OOPS}
DiPortable Secure
➢ Java was designed to be easy for professional programmer to learn and use effectively.
➢ No need to worry about memory management because there is Automatic Garbage Collection
in java.
12. `
https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING
Features of Java
Object-oriented
{OOPS}
DistributedPortable Secure Dyna
➢ Applications written using Java are portable in the sense that they can be executed on any kind
of computer containing any CPU or any operating system.
13. `
https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING
Features of Java
Object-oriented
{OOPS}
Distributed RobSecure Dynamic
➢ Java is true object oriented language.
➢ Everything is considered to be an “object” and all operations are performed using these
objects.
15. `
https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING
Features of Java
Distributed RobustDynamic High Performance
➢ Java has a feature called Remote Method Invocation (RMI) using which a program can invoke
method of another program across a network and get the output.
17. `
https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING
Features of Java
➢ Java checks the code during the compilation time and run time also.
➢ Java completely takes care of memory allocation and releasing, which makes the Java program
more robust.
Distributed RobustDynamic High Performance
20. `
https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING
Java Development Kit
JDK
JRE
JVM
JVM (Java Virtual Machine) is an abstract machine. It is
a specification that provides runtime environment in
which java bytecode can be executed.
JRE (Java Runtime Environment) is a runtime
environment which implements JVM and provides all
class libraries and other files that JVM uses at
runtime.
JDK(Java Development Kit) is the tool necessary to
compile, document and package Java programs. The
JDK completely includes JRE.
23. `
https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING
How does Java work?
Java Source (.java)
Java Compiler
Java Bytecode
(.class)
Compile-time Environment
Java Bytecodes move locally
or through network
Class Loader
Bytecode
Verifier
Java Class Libraries
Java Interpreter
Just in Time
Compiler
Runtime System
Java Virtual
Machine
Run-time Environment
Operating System
Hardware
26. `
https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING
Java Installation
To set the permanent path of JDK in your
system:
1. Begin by going to My Computer
Properties.
2. Click on Advanced system setting.
3. Click on Environment Variables
option
4. Select Path variable to edit
5. Enter the path to bin folder inside
JDK installed on your system.(
Default path is C:Program
FilesJavajdk1.8.0_121bin )
1
2
3
4
5
30. `
https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING
Data Types in Java
Data Type Value Bytes Required
byte -128 to 127 1
short -32768 to 32767 2
int -2147483648 to 2147483647 4
long
-9,223,372,036,854,775,808 to
9,223,372,036,854,775,807
8
float ±3.40282347E+38F 4
double ±1.79769313486231570E+308 8
char 0 to 65,536 2
boolean true or false 1(bit)
34. `
https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING
Data Operations in Java
Unary operators:
Operator Syntax Description
++ i++ Use the current value of i and
then increment the value by 1.
++i Increment the value of i by 1
and then use the new value.
-- --i Decrement the value of i by 1
and then use the new value.
i-- Use the current value of i and
then decrement the value by 1
35. `
https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING
Operator Syntax Decryption
> X>Y
Result is true if X if greater than Y; otherwise is
false
>= X>=Y
Result is true if X if greater than or equal to Y;
otherwise is false
< X<Y
Result is true if X if lesser than Y; otherwise is
false
<= X<=Y
Result is true if X if lesser than or equal Y;
otherwise is false
== X==Y
Result is true if X and Y are equal; otherwise is
false
!= X!=Y
Result is true if X and Y are not equal; otherwise
is false
Data Operations in Java
Relational operators:
38. `
https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING
Functions in Java
A function is a block of organized, reusable sets of instructions that is
used to perform some related actions.
Why do we use functions?
➢Re – usability of code minimizes redundancy
➢Procedural decomposition makes things organized
Function
Built-in Function
User Defined
Function
39. `
https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING
Syntax:
modifier returnType methodName(parameters)
{
Statements…
}
Example:
public static int add(int a, int b)
{
int result;
result = a + b;
return result;
}
Functions in Java
User Defined Function
defining function
function parameters
function return value
function call
output
42. `
https://www.edureka.co/java-j2ee-soa-trainingEDUREKA JAVA CERTIFICATION TRAINING
Class
➢ Class is a blueprint from with the object are created.
class Phone{
String brand;
int batteryPower;
String processor;
.
.
public Phone(String phoneBrand, int power, String phoneProcessor)
{
brand = phoneBrand;
Batterpower = power;
processor = phoneProcessor;
}
//Other class methods
}