Geschreven door studenten die geslaagd zijn Direct beschikbaar na je betaling Online lezen of als PDF Verkeerd document? Gratis ruilen 4,6 TrustPilot
logo-home
Tentamen (uitwerkingen)

CS 1102 Programming Self Quiz Unit 1,2 and 3- University of the People

Beoordeling
-
Verkocht
-
Pagina's
19
Cijfer
A
Geüpload op
15-08-2022
Geschreven in
2022/2023

CS 1102 Programming Self Quiz Unit 1,2 and 3- University of the People/CS 1102 Programming Self Quiz Unit 1,2 and 3- University of the People/CS 1102 Programming Self Quiz Unit 1,2 and 3- University of the People/CS 1102 Programming Self Quiz Unit 1,2 and 3- University of the People/CS 1102 Programming Self Quiz Unit 1,2 and 3- University of the People/CS 1102 Programming Self Quiz Unit 1,2 and 3- University of the People

Meer zien Lees minder
Instelling
Vak

Voorbeeld van de inhoud

1.Which of the following is NOT a valid identifier in Java?

Select one:

a. p

b. Public

c. public

d. public23

e. PuBlIc_tWeNtY_3

Question 2

What does a Java compiler do?

Select one:

a. Runs Java programs

b. Translates byte code in ".class" files into machine language

c. Translates source code in ".class" files into machine language

d. Translates source code in ".java" files into Java byte code in ".class" files

e. Translates source code in ".java" files into machine language

Feedback

Your answer is incorrect.

The correct answer is: Translates source code in ".java" files into Java byte code in ".class" files

Question 3

Consider the following line of Java code.
System.out.println("Hello, World!");
The full line of code is which of the following?

Select one:

a. a class

b. a method (subroutine)

c. an object

d. a parameter

e. a statement


Question 4

Consider the following line of Java code.
System.out.println("Hello, World!");
Which one of the following does NOT describe '"Hello, World!"'?

Select one:

a. a declaration

b. an expression

, c. a literal

d. a parameter

e. a statement

Question 5

Consider the following line of Java code.
System.out.println("Hello, World!");
"System" is which of the following?

Select one:

a. a class

b. a method (subroutine)

c. an object

d. a parameter

e. a statement


6. Consider the following Java program:


1 public class HelloWorld {
2 // My first program!
3 public static void main(String[] args) {
4 System.out.println("Hello, World!");
5 }
6}

What is on line 1?

Select one:

a. a variable declaration

b. a statement

c. a method (subroutine) definition

d. a comment

e. a class definition

Feedback

Your answer is correct.

See Section 2.1 of Eck (2014).

The correct answers are: a variable declaration, a class definition

Question 2

Consider the following Java statements.
int x = 3;
x = x++;

Select one:

, a. 0

b. 3

c. 4

d. 5

e. The question is moot. The statements have a syntax error.

Question 3

Which of the following should be used to compare the contents of two String objects in Java?

Select one:

a. =

b. ==

c. cmp

d. equals

e. ?

Feedback

Your answer is incorrect.

"=" is for assignment. "==" compares the memory locations of String objects, not their contents. "cmp" is a
command from Python, not Java. "?" Is the conditional operator. Use "s1.equals(s2)" to compare the
contents of String "s1" and "s2". See Section 2.3.3 of Eck (2014).

The correct answer is: equals

Question 4

Which of the following is NOT a valid identifier in Java?

Select one:

a. p

b. Public

c. public

d. public23

e. PuBlIc_tWeNtY_3

Question 5

What does a Java compiler do?

Select one:

a. Runs Java programs

b. Translates byte code in ".class" files into machine language

c. Translates source code in ".class" files into machine language

d. Translates source code in ".java" files into Java byte code in ".class" files

Geschreven voor

Vak

Documentinformatie

Geüpload op
15 augustus 2022
Aantal pagina's
19
Geschreven in
2022/2023
Type
Tentamen (uitwerkingen)
Bevat
Vragen en antwoorden

Onderwerpen

$17.48
Krijg toegang tot het volledige document:

Verkeerd document? Gratis ruilen Binnen 14 dagen na aankoop en voor het downloaden kun je een ander document kiezen. Je kunt het bedrag gewoon opnieuw besteden.
Geschreven door studenten die geslaagd zijn
Direct beschikbaar na je betaling
Online lezen of als PDF

Maak kennis met de verkoper

Seller avatar
De reputatie van een verkoper is gebaseerd op het aantal documenten dat iemand tegen betaling verkocht heeft en de beoordelingen die voor die items ontvangen zijn. Er zijn drie niveau’s te onderscheiden: brons, zilver en goud. Hoe beter de reputatie, hoe meer de kwaliteit van zijn of haar werk te vertrouwen is.
Timeless2024 Chamberlain College Nursing
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
3667
Lid sinds
6 jaar
Aantal volgers
3135
Documenten
2172
Laatst verkocht
1 maand geleden
Email/DM Me for the LATEST REVISED Exams, Study Guides, Assignments, Quizzes etc. @

Number one Stop Shop for Study Guides, Exams, Assignments, Test Banks etc 2023/2024

3.9

683 beoordelingen

5
342
4
127
3
105
2
41
1
68

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo makkelijk kan het dus zijn.”

Alisha Student

Bezig met je bronvermelding?

Maak nauwkeurige citaten in APA, MLA en Harvard met onze gratis bronnengenerator.

Bezig met je bronvermelding?

Veelgestelde vragen