
Quick Contact
Java Tutorial
- What is Java?
- History of Java
- Hello Java Program
- Features of Java
- Basic Syntax
- Java Setup
- Data Types in Java
- Java Variables
- Operators in Java
- JVM
- Java If-else Statement
- Switch Case Statement
- Java Loops
- Do-While Loop
- Java While Loop
- Continue Statement
- Break Statement in Java
- Constructors in Java
- Oops Concept in Java
- Features of OOPs
- Inheritance
- Exeception handeling
- Aggregation (HAS-A relationship) in Java
- Method Overriding in Java
- Method Overloading
- Java Static Keyword
- Java This Keyword
- Java Final Keyword
- Polymorphism
- Static Binding and Dynamic Binding
- Abstract class in Java
- Access Modifiers in Java
- Difference between abstract class and interface
- Interface in Java
- Garbage Collection in Java
- Java Package
- Encapsulation
- Serialization and Deserialization in Java
- Java Inner Classes
- Java Applets
- Multithreading in Java
- Thread Priorities in Java
- Thread Creation
- Inter Thread Communication
- Wrapper Classes in Java
- Java Input Output
- Java AWT Introduction
- Java Layout Manager
- Java Layout Policy
- Java AWT Events
- Collection Framework
- Collection Framework List Interface
- Swing in Java
- Swing Utility Classes
- Swing Layout Managers
- Java JDBC
- Hibernate Framework Overview – Architecture and Basics
Springboot
- Spring Environment Setup
- Spring Boot CRUD REST API Project using IntelliJ IDEA | Postman | MySQL
- Dockerizing Spring Boot Application | Spring Boot Docker Tutorial
- spring-boot-restapidocumentation with swagger
- Spring Boot HttpClient Overview
- Apache HttpClient POST HTTP Request Example
- Apache HttpClient PUT HTTP Request Example
- Apache HttpClient DELETE HTTP Request Example
- Apache HttpClient HTML Form POST Request Example
- Spring Boot JSP Exampl
- Deploying Spring Boot WAR file with JSP to Tomcat
- Spring Boot Annotations
- Spring Core Annotations
- Spring MVC Annotations with Examples
- Spring Scheduling Annotations
- Spring - Java-based Container Configuration
- Spring Java Based Configuration Example
Hibernate
- Hibernate 5 hello world
- Hibernate- One to One Unidirectional Mapping Annotation Example
- Hibernate - Batch Processing
- Hibernate - Interceptors
- Hibernate 5 - Create, Read, Update and Delete (CRUD) Operations Example
- Hibernate Transaction Management
- Hibernate One to Many Unidirectional Mapping Example
- Hibernate One to Many Bidirectional Mapping Example
- Hibernate Many to Many Annotation Mapping Example
- Hibernate Primary KeyJoin Column
- Hibernate First Level Cache with Example
- Hibernate XML Configuration Example with Maven + Eclipse + MySQL Database
- Hibernate Java Configuration Example
- JPA 2 with Hibernate 5 Bootstrapping Example
- JPA and Hibernate Cascade Types
- Hibernate/JPA - Primary Key Generation
- Hibernate 5 - Enum Type Mapping Example
- Hibernate Component Mapping
- Hibernate Object States – Transient,Persistent and Detached
- Hibernate 5 - Save an Entity Example
- Hibernate 5 - Persist an Entity Example
- Hibernate 5 - saveOrUpdate() Method Example
- Hibernate 5 - get(), load() and byId() Method Examples
- Hibernate 5 - merge() Example
- Hibernate 5 - Delete or Remove an Entity Example
- Hibernate 5 - load() Method Example
- Hibernate Session Interface Methods
- Hibernate Session.clear() Method Example
- Introduction Of Java strutes to Architecture
- Struts 2 - Architecture
- Struts 2 - Configuration Files
- Struts 2 - Actions
- Struts 2 - Interceptors
- Struts 2 - Results & Result Types
- Struts 2 - Value Stack/OGNL
- Struts 2 - File Uploading
- Struts 2 - Database Access
- Struts 2 - Validations Framework
JAVA FX
- JavaFX Tutorial
- Introduction to JavaFX Pane
- JavaFX Popup
- JavaFX group
- JavaFX Controller
- JavaFX Gradient Color
- JavaFXAnchorPane
- JavaFXTabPane
- JavaFX Scene
- JavaFX Stage
- JavaFXWebView
- JavaFX Timeline
- JavaFX Timer
- JavaFX Image
- JavaFX Background
- JavaFX dialog
- JavaFX Font
- JavaFXTextArea
- JavaFXObservableList
- JavaFX GUI
- JavaFX FXML
- JavaFXEventHandler
- JavaFXGradle
- JavafxScrollpane
- JavaFXAPI
Features of Java
The essential goal of Java programming language creation was to make it versatile, straightforward and secure programming language. Aside from this, there are additionally some great highlights which assume a significant function in the notoriety of this language. The features of Java are otherwise called java trendy expressions.
Following are the essential features of Java language.
- Simple
- Object-Oriented
- Platform independent
- Secured
- Robust
- Robust
- Architecture neutral
- Interpreted
- Interpreted
- High Performance
- Multithreaded
- Distributed
- Dynamic
Simple
Java is easy to learn, and its syntax is necessary, straightforward and easy to understand. As indicated by Sun, Java language is a simple programming language in light of the fact that:
- Syntax of java programming language is based on C++ programming language so after C++, java is the more straightforward programming language for the programmer to learn
- Java is a simple programming language because it has removed so many complicated and rarely used features like operator overloading, explicit pointers, and many more.
- There is an Automatic Garbage Collection in java so no need to remove unreferenced objects.
Objected oriented
You can model everything into an object which has data and behaviour. Java has incorporated various object-oriented concepts such as Abstraction, Encapsulation, Polymorphism, and inheritance.
Platform independent
Java is write-once, run-anywhere language. Once you compile java code, you can run it on any machine. For example: If you compile your code on Windows OS, you can efficiently run the same bytecode in Linux.
Portable
Java byte can be portable to any platform and can be executed on any platform.
Multithreaded
Java has provided multithreading feature which will help you to execute a various task in parallel. It has introduced the executor framework, which is more robust and easy to use.
High Performance
Java cannot be as fast as C and C++ as it is interpreted language, but it has provided various features such as Just in time compiler to increase performance.
Robust
Meaning of Robust is Strong. Java is a robust programming language because:
- Java uses Strong memory management.
- There is an absence of pointers that evades security issues.
- There are programmed trash assortment in java which runs on the Java Virtual Machine to dispose of articles which are not being utilized by a Java application any longer.
- In java there is exception handling and type checking tool.
Java Hello World Program
Hello, world program will be an elementary program that will print Hello, World! To console.
Before running the program, you need to make sure java is installed correctly on your machine.
Prerequisite for running a java program
Install the JDK if you don’t have installed it, download the JDK and install it.
/ First java hello world program
public class HelloWorld {
public static void main(String[] args) {
System.out.println(“Hello, World!”);
}
}
You need to save this file as HelloWorld.java.
How this java program works
Let’s see a detailed explanation of the Hello world program.
Class declaration
// First java hello world program
This is a comment in java, and this statement will be ignored at run time.
public class HelloWorld {
As java is object-oriented programming, every java application should have a class definition.
-
Class declaration:
A class declaration includes the name and visibility of the class. class HelloWorld is the declaration of class which provides for keyword class, followed by identifier HelloWorld
- Class declaration is followed by curly braces {}, which defines class’s definition.
Main Method
public static void main(String[] args) {
This is called the main method in java. This is the entry point for this program.
public: This is access modifier which is used to define visibility. Here the main method will be visible to all other classes.
static: static members belong to the class rather than any specific object. It simply means you can access the static members without object.
void: void is another keyword which defines the return type of the main method. It simply means main method does not return anything before terminating the program.
main: main is method name here.
String args[]: You can pass arguments to java program using args[] array. It is used to take user input using the command line.
Print statement
System.out.println(“Hello, World!”)
System.out.println
System.out.println is used to print literals in double quotes(“”) to console. As we have passed “Hello, World!” here, it will print Hello, World! to console.
Semicolon
As you can see, each statement is terminated with a semicolon(;). You can put new lines or spaces in the code, but statement has to be ended by a semicolon.
Compile and run the program
If you run this program in eclipse ide, you can right-click and on the run as java application.
You can compile this java program using the command line as below:
Open the command prompt and go to the location where you have saved HelloWorld.java
If you run this program in eclipse ide, you can simply right click and on the run as java application.
You can compile this java program using the command line as below:
Open the command prompt and go to the location where you have saved HelloWorld.java
javac HelloWorld.java
You can run the program using the command line as below:
java HelloWorld
When you run the above program, you will get below output:
Hello, World!
When we execute java program, we need to give full class name without .java extension.
Apply now for Advanced Java Course