“Apa itu literal di java” Kode Jawaban

Apa itu literal di java

public class Test {
    public static void main(String[] args)
    {
        int a = 101; // decimal-form literal
        int b = 0100; // octal-form literal
        int c = 0xFace; // Hexa-decimal form literal
        int d = 0b1111; // Binary literal
        System.out.println(a);
        System.out.println(b);
        System.out.println(c);
        System.out.println(d);
    }
}
CodeExampler

Apa itu literal di java

public class Test {
    public static void main(String[] args)
    {
        int a = 101; // decimal-form literal
        int b = 0100; // octal-form literal
        int c = 0xFace; // Hexa-decimal form literal
        int d = 0b1111; // Binary literal
        System.out.println(a);
        System.out.println(b);
        System.out.println(c);
        System.out.println(d);
    }
}
CodeExampler

Literal Java

int a = 1;
float b = 2.5;
char c = 'F';
SAMER SAEID

Java String Literals

String str1 = "Java Programming";
String str2 = "Programiz";
SAMER SAEID

Jawaban yang mirip dengan “Apa itu literal di java”

Pertanyaan yang mirip dengan “Apa itu literal di java”

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya