0% found this document useful (0 votes)
25 views4 pages

Pract

Uploaded by

Up ka sher king
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)
25 views4 pages

Pract

Uploaded by

Up ka sher king
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/ 4

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 pla orm. Java is a high level, robust, object-oriented and
secure programming language.

Java was developed by Sun Microsystems (which is now the 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.

Ge ng 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
essen al tools. You can download the JDK from the official Oracle website and follow the installa on
instruc ons for your opera ng 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 comple on, debugging, and project management, making them invaluable tools for
developers.

Pla orm: Any hardware or so ware environment in which a program runs, is known as a pla orm.
Since Java has a run me environment (JRE) and API, it is called a pla orm.

AD

Java Example

Let's have a quick look at Java programming example. A detailed descrip on of Hello Java example is
available in next page.

Simple.java

1. class Simple{

2. public sta c void main(String args[]){

3. System.out.println("Hello Java");

4. }

5. }

Applica on

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 Applica ons such as acrobat reader, media player, an virus, etc.

2. Web Applica ons such as irctc.co.in, javatpoint.com, etc.


3. Enterprise Applica ons such as banking applica ons.

4. Mobile

5. Embedded System

6. Smart Card

7. Robo cs

8. Games, etc.

Types of Java Applica ons

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

1) Standalone Applica on

Standalone applica ons are also known as desktop applica ons or window-based applica ons. These
are tradi onal so ware that we need to install on every machine. Examples of standalone
applica on are Media player, an virus, etc. AWT and Swing are used in Java for crea ng standalone
applica ons.

2) Web Applica on

An applica on that runs on the server side and creates a dynamic page is called a web applica on.
Currently, Servlet, JSP, Struts, Spring, Hibernate, JSF, etc. technologies are used for crea ng web
applica ons in Java.

3) Enterprise Applica on

An applica on that is distributed in nature, such as banking applica ons, etc. is called an enterprise
applica on. It has advantages like high-level security, load balancing, and clustering. In Java, EJB is
used for crea ng enterprise applica ons.

4) Mobile Applica on

An applica on which is created for mobile devices is called a mobile applica on. Currently, Android
and Java ME are used for crea ng mobile applica ons.

AD

Java Pla orms / Edi ons

There are 4 pla orms or edi ons of Java:

1) Java SE (Java Standard Edi on)

It is a Java programming pla orm. It includes Java programming APIs such as java.lang, java.io,
java.net, java.u l, java.sql, java.math etc. It includes core topics like OOPs, String, Regex, Excep on,
Inner classes, Mul threading, I/O Stream, Networking, AWT, Swing, Reflec on, Collec on, etc.

2) Java EE (Java Enterprise Edi on)

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

AD
3) Java ME (Java Micro Edi on)

It is a micro pla orm that is dedicated to mobile applica ons.

4) JavaFX

It is used to develop rich internet applica ons. It uses a lightweight user interface API.

AD

Prerequisite

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

AD

Audience

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

Problem

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

AD

This Java tutorial has provided you with a solid founda on to start your journey into the world of
Java programming. From se ng up your development environment to understanding basic syntax,
data types, control flow, object-oriented programming, and excep on handling, you've learned the
essen al concepts that will enable you to write Java code with confidence. As you con nue your
learning journey, don't hesitate to explore more advanced topics and prac ce wri ng code regularly
to reinforce your skills. Happy coding!

AD

Java Tutorial MCQ

1) What is the use of the "this" keyword in Java?

1. Referring to the instance variable when a local variable has the same name

2. Passing itself to the method of the same class

3. Passing itself to another method

4. Calling another constructor in constructor chaining

Show AnswerWorkspace

2) Which type of Java applica on uses GUI components like AWT, Swing, and JavaFX?
1. Web Applica ons

2. Standalone Applica ons

3. Mobile Applica ons

4. Distributed Applica ons

Show AnswerWorkspace

3) What is the primary role of the javac command in Java?

1. To execute Java applica ons

2. To compile Java source code into bytecode

3. To manage Java packages

4. To op mize Java code

Show AnswerWorkspace

4) What is the purpose of the final keyword in Java?

1. To create a constant variable

2. To prevent method overriding

3. To prevent inheritance

4. All of the above

You might also like