alternative
  • Home (current)
  • About
  • Tutorial
    Technologies
    SQL -Structured Query Language
    Python
    Ethical Hacking
    Java
    .net Framework
    Placement Preparation
    Quantitative Aptitude
    View All Tutorial
  • Quiz
    SQL -Structured Query Language
    Quantitative Aptitude
    Java
    View All Quiz Course
  • Q & A
    Quantitative Aptitude
    Java
    View All Q & A course
  • Programs
  • Articles
    Artificial Intelligence & Machine Learning Project
    How to publish your local website on github pages with a custom domain name?
    How to download and install Xampp on Window Operating System ?
    How To Download And Install MySql Workbench
    How to install Pycharm ?
    How to install Python ?
    How to download and install Visual Studio IDE taking an example of C# (C Sharp)
    View All Post
  • Tools
    Program Compiler
    Sql Compiler
    Replace Multiple Text
    Meta Data From Multiple Url
  • Contact
  • User
    Login
    Register

Java - Thing to know before proceed - Datatype Tutorial

There are 2 types of data types in Java: primitive datatype and non-primitive datatype.

Primitive Datatype- The datatype includes short, int, float, double, long, boolean, char, byte.

There are eight primitive data types supported by Java

  1. Boolean Data type
  • It is used to store only two possible values: true and false.
  • This data type is used to represent one bit of information.
  • Its default value is false.
  1. Byte Data type
  • It is a single 8-bit signed two's complement integer.
  • Its value-range lies between -128 (-27 )to 127 (27 -1)(inclusive)
  • Its default value is 0.
  1. Char Datatype
  • It is a single 16-bit Unicode character.
  • Its value-range lies between ‘\u0000’ (0) to ‘\uffff’ (65,535)(inclusive)

 

  1. Short Datatype
  • It is a 16-bit signed two's complement integer.
  • Its value-range lies between -32,768 (-215 )to 32,767 (215 -1)(inclusive)
  • Its default value is 0.
  1. Int Datatype
  • It is a 32-bit signed two's complement integer.
  • Its value-range lies between - 2,147,483,648 (-231 )to 2,147,483,647 (231 -1)(inclusive)
  • Its default value is 0.
  • An integer is generally used as the default data type for integral values unless if there is no problem with memory.
  1. Float Datatype
  • It is a single-precision 32-bit IEEE 754 floating point
  • Its value-range is unlimited.
  • Its default value is 0.0f
  • Float is never used for precise value, it is used for decimal value, eg .currency
  1. Double Datatype
  • It is a double-precision 64-bit IEEE 754 floating-point.
  • Its value-range is unlimited
  • It’s default value is 0.0d
  • Double is also never used for precise value, it is used for decimal value, eg .currency

 

  1. Long Datatype
  • It is a 64-bit signed two's complement integer.
  • Its value-range lies between -9,223,372,036,854,775,808 (-263 )to 9,223,372,036,854,775,807 (263 -1)(inclusive)
  • Its default value is 0L.
  • Long is only used when a wider range value is needed.

 

Non-Primitive Datatype- The datatype includes Classes, Interfaces, and Array.

Java

Java

  • Introduction
  • Installation and running a first java program
    • JDK Installation
    • Environment Variable Path Setup
    • Running a first java program
  • 1st Java Program Explanation
    • Program Syntax
  • JDK,JRE,JVM
    • JRE
    • JDK
    • JVM
  • Thing to know before proceed
    • Variable
    • Datatype
    • Operator
    • Keyword
    • Access Modifier
  • Decision Control and looping statement
    • If-else
    • Switch
    • For
    • While
    • do-while
    • break
    • continue
  • Object-Oriented Programming (OOPS) Concept
    • About OOPs
    • Object & Class
    • Inheritance
    • Polymorphism (Runtime & Compile Time)
    • Abstraction (Using abstract and interface)
    • Encapsulation

About Fresherbell

Best learning portal that provides you great learning experience of various technologies with modern compilation tools and technique

Important Links

Don't hesitate to give us a call or send us a contact form message

Terms & Conditions
Privacy Policy
Contact Us

Social Media

© Untitled. All rights reserved. Demo Images: Unsplash. Design: HTML5 UP.