Question: Which for the loop prints the odd numbers from 1 to 99? a) for(int n = 1;n

Which for the loop prints the odd numbers from 1 to 99?

a) for(int n = 1;n <= 99; i++){

System.Out.println(n);

}

b) for(int n = 1;n <= 99; i += 2){

System.Out.println(n);

}

c) for(int n = 1;n <= 99; i *= 2){

System.Out.println(n);

}

d) for(n <= 99; int n <= 1; i -= 2){

System.Out.println(n);

}

2. Which statement is needed to use a Scanner object?

import java.util;

import java.lang;

import java.util.Scanner;

import.java.lang.Scanner;

3. In a method definition, which annotation is used to indicate that the method overrides the method with the same name in the base class.

@Override

@Overrides

@Replace

@Replaces

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!