I got stuck while studying Java SE 7/8 Bronze

Integer-to-integer operations are truncated after the decimal point

System.out.println(5/2);

//Output result: 2

Decimal types cannot be used in switch statement conditions

double num = 2.5 ;
        
switch(num){
    case 2.5:
        System.out.println("2.5");
        break;
                
    default:
        System.out.println("2.Other than 5");
        break;
}
//Compile error
//Incompatible type: irreversible conversion from double to int

Infinite loop with for statement

An infinite loop is created by omitting the conditional expression of the for statement.

for(int i=0;/*this part*/;i++){ 
    System.out.print(i);
}
//Output result: 012345678910........ 

Recommended Posts

I got stuck while studying Java SE 7/8 Bronze
I got stuck trying Volley's synchronization process (Java)
I took Java SE8 Gold.
I got stuck in File
Java SE Bronze (1Z0-818) Passing Experience
Java SE Bronze exam test content
Orcacla Java Bronze SE 7/8 Qualification Study
Studying Java ―― 3
Studying Java ―― 9
Studying Java ―― 4
Studying Java -5
Studying Java ―― 1
Studying Java # 0
[JAVA] Project Euler, I got stuck in Q8, so make a note
Java SE 8 Silver (Java SE 8 Programmer I) Pass Note
Studying Java ―― 8
Studying Java ②
Studying Java ―― 7
Studying Java ―― 2
Studying Java ①
Studying Java -10
Where I got stuck in today's "rails tutorial" (2020/10/08)
I studied for 3 weeks and passed Java Bronze
Students challenged Java SE 7/8 Bronze with no diligence.
Where I got stuck in today's "rails tutorial" (2020/10/05)
Where I got stuck in today's "rails tutorial" (2020/10/06)
Where I got stuck in today's "rails tutorial" (2020/10/04)
I got stuck when port forwarding with VBox
Where I got stuck in today's "rails tutorial" (2020/10/07)
Java SE Overview
I took Oracle Java Bronze SE 7/8 now, so I will write it as an article
Studying Java 8 (Optional)
Java SE 7 memo
Studying java9 (jShell)
Studying Java 8 (Stream)
Java SE Subscription
Former liberal arts doctor obtained Oracle Java Bronze SE 7/8
I got stuck in a clone of a two-dimensional array
Java SE Bronze Exam Number: 1Z0-818 (Loop Statement) (October 2020)