Datatype in java

Datatypes in java

Data types specify the different sizes and values that can be stored in the variable. There are two types of data types in Java

1.Primitive data types: The primitive data types include boolean, char,   byte, short, int, long, float and double.

2.Non-primitive data types: The non-primitive data types include Classes, Interfaces, and Arrays.


Primitive Datatypes in java 

There are 8 types of primitive data types:

  • boolean data type
  • byte data type
  • short data type
  • int data type
  • long data type
  • float data type
  • double data type
  • char data type

Syntax

int a=10;


Comments

Popular posts from this blog

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalStateException: Cannot load driver class: com.mysql.jdbc.Driver