top of page
Writer's pictureRosario Riley

Data Types in Java Programming

What is Java Language?

Java is concurrent, class-based, object-oriented, and specifically designed to have as few implementation dependencies as possible. Java technology is used to develop applications for a variety of environments, from consumer devices to heterogeneous enterprise systems. This section provides an overview of the Java platform and its components.


Data types in Java programming are as below:-


Integer

Integer data types are used only for storing numeric data. That is, a number that has no fractions of its own.




Float

Floating-point types include all types that can have fractions in their numbers, such as 3.14 and pi.

Character

Most modern computer programming languages ​​store alphabets and letters by representing each with a small numeric code.

String

Most modern computer programming languages ​​provide a means of representing strings, which are collections of characters such as words and phrases, to perform manipulation operations on data for various purposes.

Array

An array is a collection of data items all of the same data type. It's easier to do by performing some operations on the index values.

Example:-

public class Main

{

public static void main(String[] args)

{

int int_value = 108;

float float_value = 33.55f;

char char_value = 'T';

String str_value = "TCCI";

System.out.println("Integer value is..."+int_value);

System.out.println("Float value is..."+float_value);

System.out.println("Character value is..."+char_value);

System.out.println("String value is..."+str_value);

}

}

Output:-

Integer value is...108

Float value is...33.55

Character value is...T

String value is...TCCI

TCCI computer classes are located in Bopal Ahmedabad and ISCON Ambli Road in Ahmedabad.

For More Information:

Call us @ +91 9825618292

Recent Posts

See All

Comments


bottom of page