0

Some output doesn't work as well

It displays no output & some time error

16th Nov 2018, 8:28 PM
Mohamed A. Mahmoud
Mohamed A. Mahmoud - avatar
10 Antworten
+ 4
Possible solution public class Program { public static void main(String[] args) { String name ="David"; int age = 42; double score =15.9; char group = 'Z'; System.out.println("Age: " + age); System.out.println("Score: " + score); System.out.println("Group: " + group); } }
16th Nov 2018, 8:41 PM
Babak
Babak - avatar
+ 4
Moha Mahmoud LOL! 8D
17th Nov 2018, 9:43 AM
Babak
Babak - avatar
+ 2
Well, there is no output because you have no statement in your code that writes to the console. Try adding a System.out.println(); to your code, with any variable you want to output as the argument.
16th Nov 2018, 8:41 PM
Shadow
Shadow - avatar
+ 1
Please show us your code, otherwise there is little we can do by just seeing the error message (except guessing, which wouldn't be helpful).
16th Nov 2018, 8:30 PM
Shadow
Shadow - avatar
+ 1
Thanks BaB ^_- C++ Soldier (Babak)
17th Nov 2018, 9:42 AM
Mohamed A. Mahmoud
Mohamed A. Mahmoud - avatar
0
Well thanks
16th Nov 2018, 8:33 PM
Mohamed A. Mahmoud
Mohamed A. Mahmoud - avatar
0
class MyClass { public static void main(String[ ] args) { String name ="David"; int age = 42; double score =15.9; char group = 'Z'; } }
16th Nov 2018, 8:34 PM
Mohamed A. Mahmoud
Mohamed A. Mahmoud - avatar
0
It's example BTW
16th Nov 2018, 8:35 PM
Mohamed A. Mahmoud
Mohamed A. Mahmoud - avatar
0
Let's try
16th Nov 2018, 8:42 PM
Mohamed A. Mahmoud
Mohamed A. Mahmoud - avatar
0
Thanks shadow
16th Nov 2018, 8:44 PM
Mohamed A. Mahmoud
Mohamed A. Mahmoud - avatar