AP Computer Science A: Unit 2 Exam Fundamentals of Java
AP Computer Science A: Unit 2 Exam Fundamentals of Java Consider the following variable declarations. int a = 5; int b = 4; double x = 5; double y = 4; Which of the following expressions would evaluate to the number, 1? 1. (int) x / y 2. a / b 3. a % b - Answer All of them. (1 , 2, and 3) Consider the following variable declarations. 1. double x = (int) 3.4 2. int y = (int) 5 / 2 , 5 3. String z = new String(" ") - Answer 1 and 3 Consider String a below. Which of the following would create a new String with the value, "ram"? String a = new String ("Java Program"); - Answer String b = ring(9);
École, étude et sujet
- Établissement
- Ap computer Science
- Cours
- Ap computer Science
Infos sur le Document
- Publié le
- 19 avril 2024
- Nombre de pages
- 6
- Écrit en
- 2023/2024
- Type
- Examen
- Contient
- Questions et réponses
Sujets
-
ap computer science a
Document également disponible en groupe