Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Database 11g SQL

Authors: Jason Price

1st Edition

0071498508, 978-0071498500

More Books

Students also viewed these Databases questions

Question

Describe how language reflects, builds on, and determines context?

Answered: 1 week ago