Skip to content

Tag Archives: Java-Data Types

Consider the following two codes in Java: // This program prints true class Geeksforgeeks {   public static void main(String args[]) {     float f = 5.25f;… Read More
The BigDecimal class provides operations on double numbers for arithmetic, scale handling, rounding, comparison, format conversion and hashing. It can handle very large and very… Read More
Prerequisite:Wrapper Classes Utility methods of Wrapper classes:The objective of Wrapper class is to define several utility methods which are required for the primitive types. There… Read More
Find the output of the program public class Multicast {     public static void main(String[] args) {     System.out.println((int) (char) (byte) -1);     } } This program is… Read More
Predict the output of the following program public class LongDivision {     public static void main(String[] args) {     final long MICROS_PER_DAY = 24 * 60 *… Read More
Increment operator It is used to increment a value by 1. There are two varieties of increment operator: Post-Increment : Value is first used for… Read More
The Boolean data type is one of the primitive data types in both C++ and Java. Although, it may seem to be the easiest of… Read More
Predict the output of the following program. class Test {     public static void main(String[] args)     {         Double object = new Double("2.4");         int a = object.intValue();… Read More
Predict the output of following Java program. class Test {      public static void main(String[] args) {        for(int i = 0; 0; i++)        {            System.out.println("Hello");            break; … Read More
class Main {       public static void main(String args[]) {                int t;                System.out.println(t);      }    } (A) 0 (B)… Read More