fork download
  1. public class StringDemo{
  2. public static void main(String args[]){
  3. char[] helloArray = { 'h', 'e', 'l', 'l', 'o', '.'};
  4. String helloString = new String(helloArray);
  5. System.out.println( helloString );
  6. }
  7. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:1: class StringDemo is public, should be declared in a file named StringDemo.java
public class StringDemo{
       ^
1 error
stdout
Standard output is empty