
Patrick B. answered 04/05/20
Math and computer tutor/teacher
class Junk
{
public static void main(String args[])
{
// Problem #1
int a[] = new int[5];
for (int i=0; i<a.length; i++)
{
++a[i];
}
for (int i=0; i<a.length; i++)
{
System.out.println(a[i]);
}
// Problem #2
int x=9;
int y=3;
System.out.println(" x!=y " + (x!=y));
String outbuff = ( x!=y) ? "They are not equal" : "They are equal";
System.out.println(outbuff);
}
}
Lavi M.
in problem 1 the output is all 104/06/20