Computer Science, asked by caparikshitray, 9 months ago

import java.util.*;
public class test
{
public static void main(String args[])
{
Scanner sc=new Scanner(System.in);
System.out.println("Please enter a positive integer");
int a=sc.nextInt();
System.out.println("1");
if(a>1)
{
System.out.println("Please enter a positive integer");
System.out.println("2");
}
else{

System.out.println("3");
for(int n=1;n>11;n++)
{
int no=n*a;
System.out.println(a+"*"+n+"="+no);
}
}
}
}

Why is this program not working on BlueJ????

Answers

Answered by ankushchakraborty568
3

I have tried a lot but I can't figure it out but I have catch mistake over you program that is is you have initialise integer value no in a loop you have to initialise it before the loop ok.

Answered by adritabarmanroy
0

Answer:

Explanation:

The most common cause of this problem is that the JDK version is too low, and BlueJ requires a newer version (e.g. some versions of BlueJ require Java 6 and produce this issue when run with Java 5). Then, use the "select VM" utility (from the start menu) to choose the newer JDK for BlueJ.

Fix this problem:

1. To find syntax errors, click compile: BlueJ will high light the first syntax error: c == 0; ...

2. Correct the error: Find out what is wrong with the code (i.e., why is it wrong) ? Then correct it and press compile again, until BlueJ reports no error:

#SPJ3

Similar questions