Question: Can you run this Java program either in Visual Studio or Netbeans or Eclips and make a screenshot of the invalid output? please attach a

Can you run this Java program either in Visual Studio or Netbeans or Eclips and make a screenshot of the invalid output? please attach a short paragraph of description of why we test the invalid situation of it and how come to the invalid output.

For example, this is the valid input:

Can you run this Java program either in Visual Studio or Netbeans

Here is the code:

import java.util.*; // thread class class X extends Thread{ public void run() { JavaApplication1.arr[0]=0; JavaApplication1.arr[1]=1; // loop til; n times for(int i=2;i JavaApplication1.arr[i]=JavaApplication1.arr[i-1]+JavaApplication1.arr[i- 2];} } }

// driver class public class JavaApplication1 {

// declare a variable n static int n; // a variable of size 100 static int arr[]=new int[100]; public static void main(String args[]) { // fibonacci sequence System.out.println("enter the number of fibbonacci series length :"); // take the input Scanner sc=new Scanner(System.in); String str=sc.nextLine(); // take n as the input n=Integer.parseInt(str); // declare a thread X thread1=new X();

// start the thread thread1.start();

// run the thread try{ thread1.join(); } catch(Exception e) { }

// print the fibonacci numbers System.out.println("the fibbonacci series numbers are"); for(int i=0;i System.out.println(arr[i]);

} }

public class test5 f static int n static int arr[]=new int [100]; e ublic static void main (String args[) System.out.println ("enter the number of fibbonacci series length ") scanner sc=new Scanner (System.in); String str=sc.nextline(); n-Integer.parseInt (str): EL Problems @JavadocDeclaration.Console X sterminated> test5 [Java Application] CProgram Files Java jre8bin javaw.exe (Sep 29, 2013 3:58:09 PM enter the number of fibbonacci series length 7 the fibbonacci series numbers are: 1 1 2

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!