JAVA PROGRAMMING BASICS

ย 

WHY JAVA?

Learning any programming language is depth as much as of a sea, but the start is necessary with the target. Even learning Java is quite same and it is one of the most popular programming language developed by James Gosling at Sun Microsystems, Inc. in 1991. This language deals with objects in real life, so it is known as object-oriented programming language. It is fast, secure and reliable. Java is most preferable language in many Software companies.ย 

Java Platform:

Java platform consists of programs and helps to run and develop a program that will be written in the Java programming language. Java is a platform-independent language. It contains execution engine, a compiler and set of libraries.

Editions of Java:

There are three editions, each edition has its own capabilities:

  • Java Standard Editions (JSE)- used to create programs in a computer.
  • Java Enterprise Edition (JEE)- used to create large programs that run on the server and helps in managing heavy traffic when occurred.
  • Java Micro Edition (JME)- used to develop applications for small devices.

Basic Program(To print "Hello LetsUpgraders!")

// First Java Program
public class HelloUpgraders
{ 
    public static void main(String[] args) 
    { 
        // To print in the terminal window
        System.out.println("Hello LetsUpgraders!"); 
    } 
} 

OUTPUT :

Hello LetsUpgraders!

Variables:

A variable is a name given to a memory location.

There are three types of variables:

  • local variable
  • static variable
  • instance variable

We can declare variables in java as follows:

ย 

Data Types:

Data type is nothing but the type of data declared. It includes integers, characters, floating point integers etc.

ย 

Loops:

Loops are used to execute a set of statements given under a condition repeatedly until the given condition is satisfied and completed. In Java, there are three types of loops: for, while and do-while. Java also provides infinite loop other than these loops.

Methods:

In a method, data, known as parameters are passed. After passing it can't be directly executed. It can be executed only when it is called. Method performs certain actions, so can also be known as functions.

Classes and Objects in Java:

Classes are like instructions to build an object. Objects are the instances of the class. It contains attributes and methods. To make programs easy and understandable to any user, these are very helpful to use.ย 

APPLICATIONS:

  • Desktop GUI Applications
  • Mobile Applications
  • Scientific Applications
  • Web-based Applications
  • Embedded Systems
  • Big Data Technologies
  • Distributed Applications
  • Cloud-based Applications
  • Software Tools
  • Gaming Applications

ย 

HAPPY LEARNING :)

ย