+ 7

What is the Error in this code & how to resolve this ?

Why I am getting error of this code even I am using simple method. public class Program { public static void main(String[] args) { nameAge(Rahul,22); } public static void nameAge(String name ,int age) { System.out.println("The Age of "+name+"is = "+age); } }

26th May 2017, 4:16 PM
Rahul Roy
Rahul Roy - avatar
2 Respostas
+ 9
public class Program{ public static void main(String[] args) { nameAge("Rahul", 22); } public static void nameAge(String name, int age) { System.out.println("The Age of " + name+ " is = " + age); } } /*You missed those double quotes bro.*/
26th May 2017, 6:31 PM
Biraj Patel
+ 5
please correct the code and show the output
26th May 2017, 4:26 PM
Rahul Roy
Rahul Roy - avatar