Computer Science, asked by shaanpandya24, 6 months ago

"Write a Java program to declare and initialize variables of all primitive data types​ "
Please help me
I don't know
It's my Exam

Answers

Answered by imtiyazallam
2

Answer:

public class Test {

   public static void main(String args[]) {

       byte b = 72;

       short s = 150;

       int i = 7500;

       long l = 123456L;

       float f = 12.4f;

       double d = 1.232323232323;

       char c = 'A';

       boolean bo = true;

   }

}

Best of luck for your exam.

Similar questions