cannot find symbol symbol: variable s location: class com.codegym.task.task01.task0110.Solution:
Solution.java, line: 12, column: 28
this error of this code
String name="abc";
System.out.println(s);
i am getting this error
Under discussion
Comments (5)
- Popular
- New
- Old
You must be signed in to leave a comment
Gaurav bhatt
28 February 2019, 14:46
/*
A variable on our screen
*/
public class Solution {
public static void main(String[] args) {
String name ="name";
System.out.print(name);
}
}
+2
jacob sudarsan
21 October 2018, 09:33
u hav not declared variable s and passing it as an argument in println method.
correct code would be
System.out.println(name);
+2
Theresa Bollhagen
9 October 2018, 02:04
String name = "Me";
System.out.println(name);
0
Ashley Niahl Dcunha
28 September 2018, 06:44
change System.out.println(s); to System.out.println(name);
because u have not declared the variable string as s instead u declared it as name ...
so u cant call the variable which u have not declared at all....
0
Ankush Rajput
27 September 2018, 13:05
Where have you declared variable 's' ?
You are declaring a String variable called name and passing 's' in println.
replace s with name.
0