software development final

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/9

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

10 Terms

1
New cards

which option can be the header of a user-defined method which takes one input of type double and returns an output of type int?

public static int MyMethod(double input)

2
New cards

suppose you defined a method with the following header. which statement correctly calls the function in the main method?

public static void MyMethod(int input)

MyMethod(6);

3
New cards

which statement defines a two-dimensional array with components of type double and with 2 rows and 5 columns?

double[][] MyArray = new double[2][5];

4
New cards

which one is not a correct statement?

double[] MyArray = {{1}, {2}, {4}};

5
New cards

which statement is assigning value to the component in the second row and the third

column of a two-dimensional array named MyArray?

MyArray[1][2] = 5;

6
New cards

which of the following statements return the number of characters in a String variable

named Message?

System.out.println(Message.length())

7
New cards

which statement is not correct?

char letter = “B”;

8
New cards

suppose you defined a class named circle. This class has one double attribute named Radius, and one double attribute named Area. which is a “constructor” that assigns value to Radius and calculate the area of the circle, assigning value to Area?

Circle(double newRadius){

Radius = newRadius;

Area = Radius *Radius Math.PI;

}

9
New cards

suppose you defined a class named Circle. this class has one double attribute named Radius, and one constructor that take an input and assign it to Radius. which statement defines an object of type Circle?

Circle NewCircle = new Circle(10);

10
New cards

suppose you defined a class named Car. which statement declares a one-dimensional array of size 10 with components which are objects of type Car?

Car[ ] CarArray= new Car[10];