I am a beginner studying Java using NetBeans. I created my first class and some simple code:
public class suju {
public static void main(String[] args){
System.out.print("hello word");
}
}
Why don't I see any result when I click run
? I am supposed to see hello world
but nothing like this is shown.
Only a message BUILD SUCCESSFUL (total time: 0 seconds)
Unfortunately, I can't post images yet to better present the problem I am facing.
Try to run the code on cmd and try. If it runs successfully, check if you are executing the java class or the project in total. That may be the reason of no output. Else then try reinstalling your NetBeans IDE.
We right-click with the mouse and select the Save As... option or press the shortcut Ctrl+S (in Windows). We see a dialog where we can select the filename for the output. Once we press the OK button the contents of the output window is saved to the file.
Go to Window option> Click on output. Clicking Ctrl + 4. Right click on the bottom right corner of NetBeans and Click on Show Output.
Try to right click on the class file on the left panel then choose run option
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With