0% found this document useful (0 votes)
3 views25 pages

Java Tutorial - Learn Java Programming - Tpoint Tech

The document is a comprehensive Java tutorial designed for both beginners and professionals, covering the history, features, and various applications of Java programming. It includes detailed sections on Java basics, object-oriented programming concepts, control statements, and various Java platforms and editions. Additionally, it provides practical examples, coding guidelines, and resources for setting up the development environment.

Uploaded by

Puja Verma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views25 pages

Java Tutorial - Learn Java Programming - Tpoint Tech

The document is a comprehensive Java tutorial designed for both beginners and professionals, covering the history, features, and various applications of Java programming. It includes detailed sections on Java basics, object-oriented programming concepts, control statements, and various Java platforms and editions. Additionally, it provides practical examples, coding guidelines, and resources for setting up the development environment.

Uploaded by

Puja Verma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 25

3/22/25, 6:16 PM Java Tutorial | Learn Java Programming - Tpoint Tech


Python Java JavaScript SQL C++ HTML CSS

Java Tutorial

Java Tutorial
History of Java
Features of Java
C++ vs Java
Java Hello World Program
Program Internal
How to set path in Java?
Difference between JDK, JRE and JVM
JVM: Java Virtual Machine
Java Variables
Data Types in Java
Unicode System in Java
Java Operators
Java Keywords

Control Statements

Control Statements in Java


Java If-else Statement
Java Switch Statement
Java For Loop
Java While Loop
Java Do-While Loop
Java Break
Java Continue
Java Comments
Java Programs

Java Object Class

Java OOPs Concepts


Java Naming Convention

https://www.tpointtech.com/java-tutorial 1/25
3/22/25, 6:16 PM Java Tutorial | Learn Java Programming - Tpoint Tech

Classes and Objects in Java


Methods in Java
Constructors in Java
static keyword in Java
this Keyword in Java

AD

next →

Java Tutorial
Our Core Java programming tutorial is designed for students and working professionals.
Java is an object-oriented, class-based, concurrent, secured and general-purpose
computer programming language. It is a widely used robust technology.

What is Java?
Java is a programming language and a platform. Java is a high-level, robust, object-
oriented and secure programming language.

Java was developed by Sun Microsystems (which is now a subsidiary of Oracle) in the year
1995. James Gosling is known as the father of Java. Before Java, its name was Oak. Since
Oak was already a registered company, so James Gosling and his team changed the
name from Oak to Java.

Platform: Any hardware or software environment in which a program runs is known as a


platform. Since Java has a runtime environment (JRE) and API, it is called a platform.

Java Example
Let's have a quick look at the Java programming example. A detailed description of the
Hello World! example is available on the next page.

Hey, Compile an

public class Main{


public static void main(String args[]){
System.out.println("Hello, World!");

https://www.tpointtech.com/java-tutorial 2/25
3/22/25, 6:16 PM Java Tutorial | Learn Java Programming - Tpoint Tech

}
}

Compile and Run Java

AD

Getting Started
Before diving into coding, we will need to set up your development environment. Java
development typically requires the Java Development Kit (JDK), which includes the Java
compiler and other essential tools. You can download the JDK from the official Oracle
website and follow the installation instructions for your operating system.

Once we have the JDK installed, you can use a text editor or an Integrated Development
Environment (IDE) like IntelliJ IDEA, Eclipse, or NetBeans to write and run your Java code.
IDEs provide features such as code completion, debugging, and project management,
making them invaluable tools for developers.

Application
According to Sun Microsystems, 3 billion devices run Java. There are various devices
where Java is currently used. Some of them are as follows:

1. Desktop Applications such as Acrobat Reader, media player, antivirus, etc.


2. Web Applications such as irctc.co.in, tpointtech.com, etc.
3. Enterprise Applications such as banking applications.
4. Mobile
5. Embedded System
6. Smart Card
7. Robotics
8. Games, etc.

Types of Java Applications


There are the following 4-types of applications that can be created using Java
programming:

1) Standalone Application

https://www.tpointtech.com/java-tutorial 3/25
3/22/25, 6:16 PM Java Tutorial | Learn Java Programming - Tpoint Tech

Standalone applications are also known as desktop applications or window-based


applications. These are traditional software that we need to install on every machine.
Examples of standalone applications are Media players, antivirus, etc. AWT and Swing are
used in Java for creating standalone applications.

2) Web Application
An application that runs on the server side and creates a dynamic page is called a web
application. Currently, Servlet, JSP, Struts, Spring, Hibernate, JSF, etc. technologies are
used for creating web applications in Java.

3) Enterprise Application
An application that is distributed in nature, such as banking applications, etc. is called an
enterprise application. It has advantages like high-level security, load balancing, and
clustering. In Java, EJB is used for creating enterprise applications.

4) Mobile Application
An application that is created for mobile devices is called a mobile application. Currently,
Android and Java ME are used for creating mobile applications.

AD

Java Platforms / Editions


There are four platforms or editions of Java:

1) Java SE (Java Standard Edition)


It is a Java programming platform. It includes Java programming APIs such as java.lang,
java.io, java.net, java.util, java.sql, java.math etc. It includes core topics like OOPs, String,
Regex, Exception, Inner classes, Multithreading, I/O Stream, Networking, AWT, Swing,
Reflection, Collection, etc.

2) Java EE (Java Enterprise Edition)


It is an enterprise platform that is mainly used to develop web and enterprise
applications. It is built on top of the Java SE platform. It includes topics like Servlet, JSP,
Web Services, EJB, JPA, etc.

3) Java ME (Java Micro Edition)


It is a micro platform that is dedicated to mobile applications.

https://www.tpointtech.com/java-tutorial 4/25
3/22/25, 6:16 PM Java Tutorial | Learn Java Programming - Tpoint Tech
AD

4) JavaFX
It is used to develop rich Internet applications. It uses a lightweight user interface API.

AD

Prerequisite
To learn Java, you must have a basic knowledge of C/C++ programming language.

AD

Audience
Our Java programming tutorial is designed to help beginners and professionals.

Problem
We assure you that you will not find any problems in this Java tutorial. However, if there
is any mistake, please post the problem in the contact form.

AD

Java Tutorial MCQs


1) In respect of Java, select the correct one.
AD

1. Java is a high-level, general-purpose, object-oriented programming language.


2. Java is a low-level, general-purpose, object-oriented programming language.
https://www.tpointtech.com/java-tutorial 5/25
3/22/25, 6:16 PM Java Tutorial | Learn Java Programming - Tpoint Tech

3. Java is a high-level, general-purpose, object-based programming language.


4. Java is a high-level, general-purpose, native programming language.

Show Answer Workspace

2) Which of the following Java editions is suitable for the development of web
applications?

1. Java ME
2. Java SE
3. Java EE
4. Java FX

Show Answer Workspace

3) Java programming language is also known as…….?

1. KAO
2. OKA
3. AOK
4. OAK

Show Answer Workspace

4) Who invented Java Programming?

1. Guido van Rossum


2. James Gosling
3. Dennis Ritchie
4. Bjarne Stroustrup

Show Answer Workspace

5) Which component is used to compile, debug and execute the Java programs?

1. JRE
https://www.tpointtech.com/java-tutorial 6/25
3/22/25, 6:16 PM Java Tutorial | Learn Java Programming - Tpoint Tech

2. JIT
3. JVM
4. JDK

Show Answer Workspace

AD

Do You Know?

What is the difference between JRE and JVM?

What is the purpose of JIT compiler?

Can we save the java source file without any name?

Why java uses the concept of Unicode system?

Java Basics
What is Java
History of Java
Features of Java
C++ vs Java
Java Hello World Program
Java Program Internal Details
How to set path in Java?
JDK, JRE and JVM
JVM: Java Virtual Machine
Java Variables
Identifiers in Java
Java Data Types
Type Casting in Java
Unicode System in Java
Operators in Java
Java Keywords

https://www.tpointtech.com/java-tutorial 7/25
3/22/25, 6:16 PM Java Tutorial | Learn Java Programming - Tpoint Tech

Java Control Statements


Java Control Statements
Java If-else
Java Switch
Java For Loop
Java While Loop
Java Do While Loop
Java Break
Java Continue
Java Comments
Java Programs

Java Object Class


Java OOPs Concepts
Java Naming Conventions
Object and Class in Java
Constructor in Java
static keyword in Java
this keyword in Java

Methods in Java
Methods in Java
How to Call a Method in Java
Recursion in Java
Call By Value and Call By Reference in Java

Java Inheritance
Inheritance(IS-A) in Java
Aggregation(HAS-A) in Java

Java Polymorphism
Method Overloading in Java
Method Overriding in Java
Java Covariant Return Type
Java super keyword
Java Instance Initializer block
Java final keyword

https://www.tpointtech.com/java-tutorial 8/25
3/22/25, 6:16 PM Java Tutorial | Learn Java Programming - Tpoint Tech

Java Polymorphism
Java Dynamic Binding
Java instanceof operator

Java Abstraction
Abstract class in Java
Interface in Java
Abstract class vs Interface

Java Encapsulation
Package in Java
Access Modifiers in Java
Encapsulation in Java

Java Array
Java Array
Java Jagged Array
Java Array Programs
Java Array Methods

Java OOPs Misc


Object class
Object Cloning
Java Math class
Wrapper Class in Java
strictfp keyword
javadoc tool
Command Line Argument in Java
Object vs Class
Method Overloading vs Method Overriding

Java String
Java String
Immutable String in Java
String Comparison in Java
String Concatenation in Java
Substring in Java
Methods of String class
https://www.tpointtech.com/java-tutorial 9/25
3/22/25, 6:16 PM Java Tutorial | Learn Java Programming - Tpoint Tech

Java StringBuffer class


Java StringBuilder class
String vs StringBuffer
StringBuffer vs Builder
Creating Immutable class in Java
Java toString method
StringTokenizer class in Java
Java String FAQs

Java Regex
Java Regex

Java Exception Handling


Java Exceptions
Java Try-catch block
Java Multiple Catch Block
Java Nested try
Java Finally Block
Java Throw Keyword
Java Exception Propagation
Java Throws Keyword
Java Throw vs Throws
Final vs Finally vs Finalize
Exception Handling with Method Overriding
Java Custom Exceptions

Java Inner Class


Java inner class
Member Inner class
Anonymous Inner class
Local Inner class
static nested class
Nested Interface

Java Multithreading
Multithreading in Java
Life Cycle of a Thread
How to Create Thread

https://www.tpointtech.com/java-tutorial 10/25
3/22/25, 6:16 PM Java Tutorial | Learn Java Programming - Tpoint Tech

Thread Scheduler in Java


Sleeping a thread in Java
Can we start a thread twice?
What if we Call run() method
Joining a thread in Java
Naming a thread in Java
Thread Priority in Java
Daemon Thread in Java
Thread Pool in Java
ThreadGroup in Java
ShutdownHook Thread in Java
Multitasking in Multithreading
Garbage Collection in Java
Java Runtime class

Java Synchronization
Synchronization in java
Java Synchronized Block
Java Static Synchronization
Deadlock in Java
Inter-thread Communication in Java
Interrupting a Thread in Java
Reentrant Monitor in Java

Java Input/Output
Java Input/Output
Java FileOutputStream
Java FileInputStream
Java BufferedOutputStream
Java BufferedInputStream
Java SequenceInputStream
Java ByteArrayOutputStream
Java ByteArrayInputStream
Java DataOutputStream
Java DataInputStream
Java FilterOutputStream
Java FilterInputStream
Java ObjectStream
Java ObjectStreamField
https://www.tpointtech.com/java-tutorial 11/25
3/22/25, 6:16 PM Java Tutorial | Learn Java Programming - Tpoint Tech

Java Console
Java FilePermission
Java Writer
Java Reader
Java FileWriter
Java FileReader
Java BufferedWriter
Java BufferedReader
Java CharArrayReader
Java CharArrayWriter
Java PrintStream
Java PrintWriter
Java OutputStreamWriter
Java InputStreamReader
Java PushbackInputStream
Java PushbackReader
Java StringWriter
Java StringReader
Java PipedWriter
Java PipedReader
Java FilterWriter
Java FilterReader
Java Scanner

Java File Handling


File Operations in Java
Java File class
How to Create a File in Java
How to Read File in Java
How to Delete a File in Java
Java FilePermission class
Java FileDescriptor class
Java RandomAccessFile
How to Create a Zip File in Java
How to Read and Print All Files from a Zip file in Java?
Java Path vs File

Java Serialization
Java Serialization
https://www.tpointtech.com/java-tutorial 12/25
3/22/25, 6:16 PM Java Tutorial | Learn Java Programming - Tpoint Tech

Java transient keyword

Java Networking
Java Networking Concepts
Socket Programming in Java
Java URL class
Java URLConnection class
Java HttpURLConnection
Java InetAddress class

Java Reflection
Java Reflection API
Java newInstance() method
javap tool
creating javap tool
How to Call private method from another class?

Java Memory Management


Java Memory Management
Stack vs Heap Memory in Java
Java Garbage Collection
How Garbage Collection Works in Java?
Memory Leaks in Java

Java Collections
Collections in Java
Java ArrayList
Java LinkedList
ArrayList vs LinkedList
Java List Interface
Java LinkedHashSet
Java TreeSet
Queue & PriorityQueue
Deque & ArrayDeque
Java Map Interface
Java HashMap
Working of HashMap
Java LinkedHashMap

https://www.tpointtech.com/java-tutorial 13/25
3/22/25, 6:16 PM Java Tutorial | Learn Java Programming - Tpoint Tech

Java TreeMap
Java Hashtable
HashMap vs Hashtable
Java EnumSet
Java EnumMap
Java Collections class
Sorting Collections in Java
Comparable interface in Java
Comparator interface in Java
Comparable vs Comparator
Properties class in Java
ArrayList vs Vector
Java Vector
Java Stack
Java Collection Interface
Java Iterator Interface
Java Deque Interface
Working of HashSet in Java

Searching Algorithms in Java


Linear Search in Java
Binary Search in Java

Sorting Algorithms in Java


Insertion Sort in Java
Selection Sort in Java
Bubble Sort in Java

Java JDBC
JDBC Introduction
JDBC Driver
Java Database Connectivity with 5 Steps
Connectivity with Oracle
Connectivity with MySQL
Access without DSN
DriverManager
Connection
Statement

https://www.tpointtech.com/java-tutorial 14/25
3/22/25, 6:16 PM Java Tutorial | Learn Java Programming - Tpoint Tech

ResultSet
PreparedStatement
Java ResultSetMetaData Interface
DatabaseMetaData
Store image
Retrieve image
Store file
Retrieve file
CallableStatement
Transaction Management
Batch Processing
RowSet Interface
JDBC MCQ

Java RMI
Java RMI

Internationalization in Java
Internationalization (i18N) in Java
ResourceBundle class
Internationalization with Date
Internationalization with Time
Internationalization with Number
Internationalization with Currency

Java Interview Questions


300+ Java Interview Questions

Next Topic History of Java

next →

https://www.tpointtech.com/java-tutorial 15/25
3/22/25, 6:16 PM Java Tutorial | Learn Java Programming - Tpoint Tech
AD

Related Posts

Program Internal
Internal Details of Hello Java Program In the ious section, we have created
Java Hello World program and learn how to compile and run a Java program.
In this section, we are going to learn, what happens while we compile and run
the Java program. Moreover, we...

 1 min read

Java Operators
Operators in Java Operator are an essential part of any programming
language. In Java, operator is a symbol that is used to perform operations. For
example: +, -, *, / etc. These are essential for performing different types of
operations on variables and values. In this...

 5 min read

Unicode System in Java


Computer systems internally store data in binary representation. A character
is stored using a combination of 0's and 1's. The process is called
encoding. A character encoding scheme is important because it helps to

https://www.tpointtech.com/java-tutorial 16/25
3/22/25, 6:16 PM Java Tutorial | Learn Java Programming - Tpoint Tech

represent the same information on multiple types of devices.   ASCII


(American Standard...

 3 min read

Data Types in Java


Data types specify the different sizes and values that can be stored in the
variable. There are two types of data types in Java: Primitive data types: The
primitive data types include boolean, char, byte, short, int, long, float and
double. Non-primitive data types: The non-primitive data...

 9 min read

Java Keywords
Java keywords are also known as reserved words. Keywords are particular
words that act as a key to a code. These are predefined words by Java so they
cannot be used as a variable or object name or class name. Example
//Program of java keywords public class Main...

 5 min read

Difference between JDK, JRE and JVM


Difference between JDK, JRE, and JVM A summary of JVM Java Runtime
Environment (JRE) Java Development Kit (JDK) We must understand the
differences between JDK, JRE, and JVM before proceeding further to Java.
See the brief overview of JVM here. If you want to get the detailed knowledge
of Java...

 3 min read

Java Variables
A variable is a container which holds the value while the Java program is
executed. A variable is assigned with a data type. Variable is a name of

https://www.tpointtech.com/java-tutorial 17/25
3/22/25, 6:16 PM Java Tutorial | Learn Java Programming - Tpoint Tech

memory location. There are three types of variables in java: local, instance and
static. There are two types of...

 4 min read

Features of Java
The primary objective of Java programming language creation was to make it
portable, simple and secure programming language. Apart from this, there
are also some excellent features which play an important role in the
popularity of this language. The features of Java are also known...

 4 min read

JVM: Java Virtual Machine


JVM (Java Virtual Machine) Architecture JVM (Java Virtual Machine) is an
abstract machine. It is a specification that provides a runtime environment in
which Java bytecode can be executed. JVMs are available for many hardware
and software platforms (i.e., JVM is platform-dependent). JVMs are designed
to be platform-dependent,...

 7 min read

History of Java
The history of Java is indeed fascinating. Originally designed for interactive
television, Java's journey began with the Green Team, a group within Sun
Microsystems led by James Gosling. Their goal was to create a programming
language for digital devices like set-top boxes and televisions. However,...

 11 min read

Subscribe to Tpoint Tech


We request you to subscribe our newsletter for upcoming
updates.

https://www.tpointtech.com/java-tutorial 18/25
3/22/25, 6:16 PM Java Tutorial | Learn Java Programming - Tpoint Tech

Your Email Subscribe 

Learn Important Tutorial

Python Java

Javascript HTML

Database PHP

C++ React

B.Tech / MCA

https://www.tpointtech.com/java-tutorial 19/25
3/22/25, 6:16 PM Java Tutorial | Learn Java Programming - Tpoint Tech

DBMS Data
Structures

Operating
DAA
System

Computer Compiler
Network Design

Computer Discrete
Organization Mathematics

Ethical Computer
Hacking Graphics

Web Software
Technology Engineering

https://www.tpointtech.com/java-tutorial 20/25
3/22/25, 6:16 PM Java Tutorial | Learn Java Programming - Tpoint Tech

Cyber
Automata
Security

C
C++
Programming

Java .Net

Python Programs

Control Data
System Warehouse

Preparation

https://www.tpointtech.com/java-tutorial 21/25
3/22/25, 6:16 PM Java Tutorial | Learn Java Programming - Tpoint Tech

Aptitude Reasoning

Verbal Interview
Ability Questions

Company
Questions

https://www.tpointtech.com/java-tutorial 22/25
3/22/25, 6:16 PM Java Tutorial | Learn Java Programming - Tpoint Tech
AD

https://www.tpointtech.com/java-tutorial 23/25
3/22/25, 6:16 PM Java Tutorial | Learn Java Programming - Tpoint Tech

https://www.tpointtech.com/java-tutorial 24/25
3/22/25, 6:16 PM Java Tutorial | Learn Java Programming - Tpoint Tech

https://www.tpointtech.com/java-tutorial 25/25

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy