Facebook
From Edgy Horse, 5 Years ago, written in Plain Text.
This paste is a reply to Re: Untitled from Edgy Parakeet - go back
Embed
Viewing differences between Re: Untitled and Re: Re: Untitled
import $javac HelloWorld.java
$java -Xmx128M -Xms16M HelloWorld
Exception in thread "main" 
java.util.Scanner;
public class HelloWorld{

     public static void main(String []args){
        
        Scanner scan=new Scanner(System.in);
        int[] array=new int[10];
        for(int i=0;i         {
            array[i]=scan.nextInt();
        }
     }
}
NoSuchElementException
        at java.util.Scanner.throwFor(Scanner.java:862)
        at java.util.Scanner.next(Scanner.java:1485)
        at java.util.Scanner.nextInt(Scanner.java:2117)
        at java.util.Scanner.nextInt(Scanner.java:2076)
        at HelloWorld.main(HelloWorld.java:10)