0

more explanation:while writing the regular "HELLO WORD" code I always face this error-noticing that the compilation goes without any errors(I mean this error appear when running) & that I use TEXTPAD for writing java programs

The code is

class HelloWorld 
{ 
    public static void main (String args[]) 
    { 
        System.out.println(“Hello World!”); 
    } 
}
JeremyP
  • 84,577
  • 15
  • 123
  • 161

1 Answers1

1

HelloWorld from scratch:

  1. Create a folder to do the hello world code
cd ~
mkdir test
cd test
  1. Create and edit the HelloWorld file
gedit HelloWorld.java

code:

public class HelloWorld{
    public static void main(String[] args){
        System.out.println("Hello world!");
    }
}
  1. Save and compile, take care of capital letters.
javac HelloWorld.java
  1. Execute

java HelloWorld

output:

Hello world!

RamonBoza
  • 8,898
  • 6
  • 36
  • 48