+ 1
I am getting an error as 'illegal start of expression' while running the below program. Kindly suggest
public class Program { public static void main(String[] args) { String firstName, lastName; firstName = "David"; lastName = "Williams"; int age= 25; System.out.println("My name is " + firstName +" "+lastName + " and I am " + age+); } }
3 Answers
0
age+ should probably be age
0
int age;
age =25;
try this
0
no + after age in println