Question: Complete the program below in order to make run properly package lab3ex1witherror; import java.io.*; import java.util.*; public class Lab3Ex1witherror { public static void main(String[] args)

Complete the program below in order to make run properly

package lab3ex1witherror; import java.io.*; import java.util.*; public class Lab3Ex1witherror {

public static void main(String[] args) {// do not change anything on this line Scanner read = new Scanner(System.in); String languages[] = {"Python", "Java", "Java Script", "Perl", "C", "C++"}; int a[] = {5, 0};

Scanner input = null; int number; int i, j;

// Exception 1 for (int i = 0; i <= languages.length; i++) {

System.out.println(languages[i]); }

//Exception 2 System.out.println("enter two integr value for i and j"); i = read.nextInt(); j = read.nextInt(); System.out.println("The result is :" + a[i] / a[j]);

// Eception3 input = new Scanner(new FileReader("data.in")); while (input.hasNext()) {

number = input.nextInt();

System.out.println(number); }

input.close(); // Eception4 Change 100 to 1000000000

} }

long data[] = new long[1000000000];

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!