Data types in java with example

In java there are main 2 types of data types. 1. Primitive Datatype. 2. Non-Primitive Datatypes. In Primitive also two types Numeric and Non-numeric datatypes. First we learn Numeric datatypes... 1.Integer datatypes. (i)byte : byte is a shortest integer Datatype.byte datatype size is 8 bits and it's range of value is -128 to 127. ex: // Example of byte datatype. package com.jaks; class main{ public static void main (String [] args){ byte A= 120; byte B= 127; System.out.println(A+B); // output is 247. // if we are take 128 value for byte it gets error. } } now it's time for second type it i...