0

Error In code

Why in this code output is No output but I coded it's to give output Test. https://code.sololearn.com/c115RETPd09n/?ref=app

30th Nov 2020, 4:43 AM
Vikash Godara
Vikash Godara - avatar
8 Antworten
+ 6
Vikash Godara first complete your full java then you are able to make java programs.... public class Program { public static void main(String[] args) { System.out.print("Hello"); } }
30th Nov 2020, 4:46 AM
ㅤㅤㅤ
+ 5
Coder Kitten yup!! Without using main function the programs will not compiles... I also tried to run in java N-IDE apk But that didn't work And i got the errors...
30th Nov 2020, 5:46 AM
ㅤㅤㅤ
+ 4
Coder Kitten but visit this site,here shown we can execute java program without using main method and by using static block how? But that code is not working on sololearn... https://www.tutorialspoint.com/can-we-execute-a-java-program-without-a-main-method
30th Nov 2020, 5:11 AM
ㅤㅤㅤ
+ 2
You need to have the main method Without main You may have n number of functions which won't show any ouput... You need to add Like public static void main(String args[]) And then you may proceed to print
30th Nov 2020, 5:56 AM
The INDIAN
The INDIAN - avatar
+ 1
Coder Kitten Why I can't change it? Is main required for every code in java?
30th Nov 2020, 4:49 AM
Vikash Godara
Vikash Godara - avatar