Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Statement I: Once an array is created, its size cannot be changed. Statement II: A sorting algorithm is a technique for scanning through an array

Statement I: Once an array is created, its size cannot be changed.

Statement II: A sorting algorithm is a technique for scanning through an array and rearranging its contents in some specific order

Select one:

a.

Both Statement I and Statement II are FALSE

b.

Statement I is FALSE and Statement II is TRUE

c.

Statement I is TRUE and Statement II is FALSE

d.

Both Statement I and Statement II are TRUE.

Statement I: A GUI program automatically stops executing when the end of the main method is reached.

Statement II: A functional interface is simply an interface that has one abstract method.

Select one:

a.

Statement I is TRUE and Statement II is FALSE

b.

Statement I is FALSE and Statement II is TRUE

c.

Both Statement I and Statement II are TRUE.

d.

Both Statement I and Statement II are FALSE.

How many times will the following for loop be executed? for (int count = 10; count <= 21; count++) System.out.println("Java is great!!!");

Select one:

a.11

b.10

c.1

d.0

Given the method header:

public double calcArea( double length, double width)

Which of the following is correct?

Select one:

a.

calcArea method must include a System.out.println statement

b.

calcArea method must include a void statement

c.

calcArea method must include a return statement

d.

calcArea method must include the main method

Identifiers cannot include __________________.

Select one:

a.

underscore

b.

dollar sign

c.

spaces

d.

letter m

Values that are sent into a method are called _____________.

For example:

sleep (5)

Select one:

a.

Arguments

b.

Attributes

c.

Variable

d.

Console

If the following is from the method section of a UML diagram, which of the following statements is TRUE?

+ equals(object2:Stock) : boolean

Select one:

a.

This is a public method that accepts a Stock object as its argument and returns a boolean value.

b.

This is a private method that returns a boolean value.

c.

This is a private method that receives two objects from the Stock class and returns a boolean value.

d.

This is a public method that returns a Stock object.

A constructor:

Select one:

a.

always accepts two arguments

b.

always has an access specifier of private

c.

has return type of void

d.

has the same name as the class

Statement I: An array can hold multiple values of several different data types simultaneously.

Statement II: If a[] and b[] are two integer arrays, the expression a == b compares the array contents.

Select one:

a.

Both Statement I and Statement II are TRUE.

b.

Statement I is FALSE and Statement II is TRUE.

c.

Both Statement I and Statement II are FALSE.

d.

Statement I is TRUE and Statement II is FALSE

What will be the values of ans, x, and y after the following statements are executed?

int ans = 35, x = 50, y =50;

if ( x >= y)

{

ans = x + 10;

x -=y;

}

else

{

ans = y + 10;

y += x;

}

Select one:

a.

ans = 60, x =0, y =50

b.

ans = 60, x = 50, y =100

c.

ans = 45, x = 50, y = 50

d.

ans = 45, x = 50, y = 0

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

Practical Database Programming With Visual C# .NET

Authors: Ying Bai

1st Edition

0470467274, 978-0470467275

More Books

Students also viewed these Databases questions