Learning Java Step By Step

You would learn the basic concepts of Java in this blog which includes Installation, discussing about Platform Suitable for Java, Variable, Data Types, Use of Print Statement and Various other Concepts.

Originally published in en
Reactions 0
833
DT
DT 30 Oct, 2019 | 3 mins read

Blog - 01

Getting Started with Java

 

Java is a programming Language and through my blogs I would cover concepts from basic level to advance level in Java.


Let us Start with a term JDK . JDK stands for JAVA DEVLOPMENT KIT . JDK consists of JVM which mean Java Virtual Machine. JVM helps us to run any byte code and give a valid or a readable output.With the help of JVM you can even do programming . The usage of command prompt is significant in JVM.


But , here we would use Eclipse as our platform to perform Learn and Practise Java.


How to download Eclipse software?


1. You can google the term eclipse.

2. You can download eclipse from its official website.

3. You can download eclipse as per your requirment like windows user can download the version for windows operating system and Mac user can download OS operating System


STARTING WITH JAVA

 

FIRST CODE IN JAVA

 

public class Smile

{

  public static void main(String[] args)

  {

      System.out.print("LEARN JAVA WITH PAPERWIFF");

  }

}

 

Here , this program would give output :

LEARN JAVA WITH PAPERWIFF

 

What you learned in this code ?

 

1. In this code , you learned about the print command in java which is System.out.print().


2. In this code , you also learned that we use double quotes from printing a string or a sequence of words in java.


3. In this code ,Public is a access modifier which has its accesibility every where inside a class , outside a class , inside a package , outside a package . Adding public to any

variable gives you permission to access that part of code anywhere.

 

For eg:

 

public int a ;

 

So, The variable a can be accessed or called anywhere inside a class , outside a class , inside a package , outside a package.

 

The concept would be detailed more in later blogs with the help of code.

 

4. In this code , We learned that main is also a method in the class.


DATA TYPES : Data types are used to define the type of the variable used in program for various function and operations.


Data types are of two types:

1.       Primitive Data types

2.       Non- Primitive Data types

 

Primitive Data types are of 8 types : byte , int , short , long , float , double , Boolean , char.


Non Primitive Data types are : Class , Union , Structure , Array , Linked List , Queue.



All about primitive Data Type is attached in image.


Relation between Bytes and Bits

1 byte = 8 Bits

A bit can be defined as a much smaller unit used to denote the memory in the workflow.


Variable in Java.


Variable can be defined a name given to something which can be stored as a value.


For eg : int age = 10


Here: 1. int is a data type

2. Age is a Variable Name

3. 10 is a value assigned to that Variable.


How Classes are named in Java?


CLASSES are named in Java Following Camel Case concept.


Declaration of Variable Using different Primitive Data Types.


1. int a = 5

2. short a = 4

3. boolean a = false

4. char c = 'a'

5. float e = 3.20000

6. double f = 4.600000


Long can even be used for more bigger data value but in normal and basic coding it has no use.


Next blog we would cover

1. Type Casting

2. Types of Type Casting

3. How to take Input from User?

4.Basic program calculating Sum of Number and Calculate Simple Intrest?

5. Basic Program to practice and discuss about various coding website.


This covered some concepts about Java. In my next blog we would cover more few concepts slowly and slowly.


Stay Tuned.

Happy Reading.

Keep smiling. ??

0 likes

Published By

DT

DT

Comments

Appreciate the author by telling what you feel about the post 💓

Please Login or Create a free account to comment.