100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

CS 1102 JAVA Self-Quiz Units 1,2,3 Questions and Answers University of the People

Rating
-
Sold
-
Pages
12
Grade
A+
Uploaded on
19-06-2025
Written in
2024/2025

CS 1102 JAVA Self-Quiz Units 1,2,3 Questions and Answers University of the People/CS 1102 JAVA Self-Quiz Units 1,2,3 Questions and Answers University of the People

Institution
Computer Programming
Course
Computer Programming









Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
Computer Programming
Course
Computer Programming

Document information

Uploaded on
June 19, 2025
Number of pages
12
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

Consider the following Java method, which term best describes "'("Hello,
World!")"?

public static void main(String[] args) {
System.out.println("Hello, World!");
}


Select one:
a. actual parameter or argument


b. formal parameter
c. method call
d. modifier

e. return type
Consider the following first line from a Java method definition.
public static boolean compute(int n, float x) {
Which one of the following lines could begin a method that legally
overloads the above method?
Select one:
a. private static boolean compute(int n, float x) {
b. public boolean compute(int n, float x) {
c. public static int compute(int n, float x) {
d. public static boolean compute(float n, int x) {



e. public static boolean compute(int x, float n) {
Which one of the following lines is a Java method call?
Select one:
a. import javax.swing.JOptionPane;
b. int x = 0;
c. compute();


d. return y;

e. void compute() {}
Consider the following Java method, which term best describes "public"?

, public static void main(String[] args) {
System.out.println("Hello, World!");
}
Select one:
a. actual parameter or argument
b. formal parameter
c. method call
d. modifier



e. return type
What is the output of the following Java program?

class Sum {
static int sum = 0;
static void add(int i) { sum += i; }
public static void main(String[] args) {
for (int i = 0; i < 10; i++) add(i);
System.out.println(sum);
}
}
Select one:
a. 0
b. 9
c. 10
d. 45
e. 100
Consider the following Java method, which term best describes "String[]
args"?

public static void main(String[] args) {
System.out.println("Hello, World!");
}


Select one:
a. actual parameter or argument
b. formal parameter

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
VEVA2K Self
View profile
Follow You need to be logged in order to follow users or courses
Sold
2833
Member since
5 year
Number of followers
2412
Documents
4158
Last sold
4 days ago
Affordable, Up-to-date-Quality Nursing Papers

Here, you'll find a wide range of Nursing Papers at an affordable rate. Every student deserves a friendly environment for study. Always message me for any concern and help. My email is

4.1

683 reviews

5
376
4
126
3
101
2
24
1
56

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions