Verityprep
Question Bank · Unit 1

AP® Computer Science A Using Objects and Methods Practice Questions

Work through AP Computer Science A practice questions on Using Objects and Methods, then check each answer against a worked solution.

Free · no sign-up Open questions need no account. Sign up or log in to open the rest.

Questions 381–390 of 776
  1. 381
  2. 382
  3. 383
  4. 384
  5. 385
  6. 386
  7. 387
  8. 388
  9. 389
  10. 390

Question 381

Multiple choice Primitive Types
Consider the following code segment: int a = 3; int b = 6; int c = 8; int d = a / b; c…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 382

Multiple choice Primitive Types
Consider the following code segment: 1 int a = 10; 2 double b = 10.7; 3 double c = a + b; 4 int d = a +…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 383

Multiple choice Primitive Types
Consider the following code segment: 1 int a = 10; 2 double b = 10.7; 3 int d = a + b; Line 3 will not compile in the code segment above. With which…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 384

Multiple choice Primitive Types
Consider the following code segment. 1 int a = 11; 2 int b = 4; 3 double x = 11; 4 double y = 4; 5 System.out.print(a / b); 6…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 385

Multiple choice Primitive Types
Consider the following statement: int i = x % 50; If x is a positive integer,…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 386

Multiple choice Using Objects
A math teacher is writing a program that will correctly calculate the area of a circle. Recall that the area of a circle is pi times the radius squared…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 387

Multiple choice Using Objects
Consider the following code segment: String s = "This is the beginning"; String t =…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 388

Multiple choice Using Objects
Given the following code, what line will cause a compiler error? 1 String word = "Sunday Funday…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 389

Multiple choice Using Objects
Given the following code, which of the following…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 390

Multiple choice Using Objects
Given the following code, what is the final value stored in…

Sign up now. It's free!

See the full question with its answer and worked solution.

Question 381 of 776
Page 39 of 78