What's wrong with my code? Please help me! | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
10th Oct 2019, 3:02 PM
RazanAbuawf
RazanAbuawf - avatar
1 Answer
+ 3
Remove the int from int ticket = input.nextInt(); because you already declared ticket as int on the previous line. And at Char h = city.CharAt(0) The Char h should be char h, not capitalized city.CharAt(0) should be city.charAt(0), the c is lower case.
10th Oct 2019, 3:21 PM
Odyel
Odyel - avatar