- 1

Why errors?

public class Program { public static void main(String[] args) { int var = 11 char var2 = 'Hyone Jun school number' System.out.println(var2) System.out.println(var) } } I'm a novice.

15th Jan 2017, 3:05 AM
Delicious Chicken
Delicious Chicken - avatar
2 Antworten
+ 3
char var2 should change to String. char only accept one character
15th Jan 2017, 3:32 AM
Peter Chei
Peter Chei - avatar
0
After int var dont firget to put semicolon, same thing after sistem.out.println();as well. Char can twke only one value,for example char var2='a'
16th Jan 2017, 2:26 AM
Aizat K.