- 2
Plz help me in this part
a) Discuss the different types of program errors and debugging strategies. Consider the following codes and identify what types of errors are associated with these codes and how you fix those errors. Class my loop{ Public static void main(string args[]) { Int [] nums = new int [10]; For(int j=0; j<=10;j++) nums[j]=j; } } B) Class my loop{ Public static void main(string args[]) { int a=40, b=60; Int sum=a+b; System.out.println(âsum of variable â+sum) } }
1 Answer
+ 2
class Myloop{
public static void main(String args[])
{
int [] nums = new int [10];
for(int j=0; j<10;j++){
System.out.print(nums[j]=j);}
}
}
class Myloop{
public static void main(String args[])
{
int a=40, b=60;
int sum=a+b;
System.out.println("sum of variable "+sum);
}
}