subject

1. what is java se?

a. java standard edition
b. java software editor
c. java scientific edition
d. java software emulator

2. which of the following is the correct header for the main method of a java program?

a. public static void main(string args)
b. public abstract void main(string[] args )
c. public static void main(string[] args )
d. public static int main(string[] args )

3. which of the following statements creates a constant in java?

a. int const = 5;
b. const int x = 5;
c. final int x = 5;
d. const x = 5;

4. which of the following statements displays 17?

a. system. out. println (2*4+3*2+1);
b. system. out. println ((2*4+3)*2+1);
c. system. out. println (2*4+(3*(2+;
d. system. out. println (2*(4+3*2)+1);

if x is an int and the original value of x is 5, which of the following statements assigns an even value to x?

5.

a. x += 2;
b. x /= 3;
c. x %= 3;
d. x *= 3;

6. if x is an int, which expression will always evaluate to true if x is evenly divisible by 5

a. x == 5
b. x % 2 == 5
c. x % 2 == 0
d. x % 5 == 0

7. consider the following directions.

int y = 5;
int z = 10;

which of the following expressions evaluates to true?

a. y > 5 & & z > = 10
b. z / y > = 2 & & y * 2 > z
c. y - z > 0 || y * 4 == z * 2
d. y + z == z + y & & z - y == y - z

8. consider the following code.

int x = 2.
switch (x) {
case 1: x += 3;
case 2: x += 5;
case 3: x += 7;
default: x += 10;
}

after the switch statement, what is the value of x?

a. 2
b. 5
c. 7
d. 24

9. if y refers to an array of int values with seven elements, and all of those elements have been given a value of 5, which statement would change the last element of a 2?

a. y {7] = 2
b. y [6] = 2
c. y [2] = 6
d. y [2] = 7

10. consider the following declaration.

int [] two = {{1, 2, 3}, {4, 5}};

which arithmetic expression evaluates to a value of 8?

a. two[3] + two[2]
b. two[2] + two [1]
c. two[1] [3] + two[2] [2]
d. two[0] [2] + two[1] [1]

11. consider the following method.

public static void print (int a, int ) {
system. out. println ("the sum is" + (a+b));
}

if the print method is in the same class as the main method and there are no other methods named print, which of the following statements, called from the main method, will not cause a compiler error?

a. system. out. println (print (2, 3));
b. system. out. println (print (2 + 3));
c. print (2, 3);
d. print (2 + 3);

12. which of the following expressions correctly and most accurately calculates the area of a circle with radius r?

a. math. pow (r, 2) * math. pi
b. math. power (r, 2) * math. pi
c. math. pow (2, r) * math. pi
d. math. exp (r, 2) * math. pi

13. consider the following code.

public class amazing {
int x;
int y;
}

which of the following shows a statement that will create an instance of class amazing and assign its reference to a reference variable?

a. amazing a = new amazing;
b. amazing a = new amazing ();
c. amazing a = amazing ();
d. it is not possible to create an instance of class amazing. it does not have a constructor.

14. consider the following code.

public class employee () {
private string firstname;
private string lastname;
private int empid;
}
which of the following shows a constructor that, if added to class employee, would allow a caller to create an object and pass in values from the call that will be assigned to its instance variables?

a. public employee () {
firstname = “fred”;
lastname = “jones”;
empid = 101;
}

b. public employee (string a, string b, int c) {
firstname = a;
lastname = b;
empid = c;
}

c. public employee (“fred”, “jones”, 101) {
firstname = a;
lastname = b;
empid = c;
}

d. public employee (string a, string b, int c) {
firstname = “fred”;
lastname = “jones”;
empid = 101;
}

15. what is the output of the following code?

string name1 = “chris”;
string name2 = “christine”;
boolean b = name1 . startswith (name2);
boolean c = name1 . charat (4) == name2 . charat (7);
system. out. println (b + “, ” + c);

a. true, true
b. true, false
c. false, true
d. false, false

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 19:20
Consider the following code snippet: #ifndef cashregister_h#define cashregister_hconst double max_balance = 6000000.0; class cashregister{public: cashregister(); cashregister(double new_balance); void set_balance(double new_balance); double get_balance() const; private: double balance[12]; }; double get_monthly_balance(cashregister bk, int month); #endifwhich of the following is correct? a)the header file is correct as given.b)the definition of max_balance should be removed since header files should not contain constants.c)the definition of cashregister should be removed since header files should not contain class definitions.d)the body of the get_monthly_balance function should be added to the header file.
Answers: 1
question
Computers and Technology, 24.06.2019 17:00
What are some examples of what can be changed through options available in the font dialog box? check all that apply. font family italicizing bolding pasting drop shadow cutting character spacing special symbols
Answers: 2
question
Computers and Technology, 24.06.2019 17:40
This assignment continues work on the online booking facility introduced at the end of chapter- 10. the work will be continued in the assignments for chapters 14 and 15 (a) assume that you will produce your online booking facility using an agile approach. i. suggest the kind of user research you would like to conduct for your product before iteration cycles begin. ii prioritize the requirements for your product according to business value, i.e which requirements are likely to provide the greatest business benefit, and sketch out the ux design work you would expect to undertake during the first four iteration cycles, i.e. cycle 0, and cycles 1 to 3. (b) using one of the mockup tools introduced above, generate a mockup of your product's landing page, as developed in the assignment for chapter-11 (c) using one of the patterns websites listed previously, identify suitable interaction patterns for elements of your product, and develop a software-based prototype that incorporates all the feedback and the results of the user experience mapping achieved at the end of chapter-11. if you do not have experience in using any of these, create a few html web pages to represent the basic structure of your website
Answers: 2
question
Computers and Technology, 24.06.2019 18:30
After making a powerpoint presentation about a new line of clothing designs, henri notices that he used the word “gorgeous” on nearly every slide. what would be the  best  way to add more variety to his wording by using tools within powerpoint? using the thesaurus under the view tab, and then using the find dialog box to find and replace every instance of “gorgeous”using the spelling checker under the view tab, and then using the find dialog box to find every instance of “gorgeous” and change some of themusing the thesaurus under the review tab, and then using the find dialog box to find every instance of “gorgeous” and change some of themusing the spelling checker under the review tab, and then using the find dialog box to find and replace every instance of “gorgeous”
Answers: 2
You know the right answer?
1. what is java se?

a. java standard edition
b. java software editor
c. jav...
Questions
question
Mathematics, 24.04.2020 02:17