0

What's wrong with my code?

String is shown in black and is not recognized. I tried writing it with/without capital letter and with single/double quotation marks. What's wrong with my code? Code: class Personal { public static void main (String [] args){ String name = "Bonita"; int age = 22; double height = 155.5; boolean girl = true; } }

27th Apr 2017, 8:10 AM
Bonita S.
Bonita S. - avatar
7 Respostas
+ 7
self-repairing code O_O welcome to the future 😮
27th Apr 2017, 9:00 AM
Burey
Burey - avatar
+ 3
code ran for me here in the playground could be something you have misspelled?
27th Apr 2017, 8:24 AM
Burey
Burey - avatar
+ 3
what error did u get..? if this is your full code,U won't get any output :/
27th Apr 2017, 8:45 AM
Manideep
Manideep - avatar
+ 2
Update: I deleted everything and rewrote it, seems to work now. I did copy my code into Word to compare them but they seemed to be the exact same. Not sure what I did wrong here, but I guess it fixed itself. 😅
27th Apr 2017, 8:50 AM
Bonita S.
Bonita S. - avatar
+ 1
@Burey, wish it would always work like that! But I guess that would make developers useless..
27th Apr 2017, 9:14 AM
Bonita S.
Bonita S. - avatar
0
@Burey, I double checked but have the exact same code written in Eclipse. @cyrus, not sure what you mean by that.. The code I wrote here was all I wrote down in Eclipse, if that answers your question.
27th Apr 2017, 8:42 AM
Bonita S.
Bonita S. - avatar
- 1
Nothing seems to be wrong in your code.
27th Apr 2017, 8:48 AM
Nantha
Nantha - avatar