Whye error??? | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
0

Whye error???

public class Program { public static void main(String[] args) { String x = "moutaz "; String y = "java"; String result = x.toUpperCase(); System.out.println(result); System.out.println(y.toUpperCase); } }

3rd May 2022, 9:59 PM
Mohammed Moutaz
1 Antwort
+ 3
toUpperCase() is a method. Hence you need the () in the last println
4th May 2022, 11:29 AM
Lisa
Lisa - avatar