Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 4 out of 57 pages
Exam (elaborations)

CNIT 255 EXAM 1 | 114 QUESTIONS AND ANSWERS WITH COMPLETE SOLUTIONS | GRADED A+ | NEW UPDATE 2025

Document preview thumbnail
Preview 4 out of 57 pages

CNIT 255 EXAM 1 | 114 QUESTIONS AND ANSWERS WITH COMPLETE SOLUTIONS | GRADED A+ | NEW UPDATE 2025

Content preview

CNIT 255 EXAM 1 | 114 QUESTIONS AND
ANSWERS WITH COMPLETE SOLUTIONS |
GRADED A+ | NEW UPDATE 2025
Which describes Java?


A) Object Oriented


B) Architecture-Neutral


C) Multithreaded



D) All of the above. - ANSWER A


Which describes the origins of Java?


A) Java was invented in in 2000.


B) Java has always been used mostly at the server level, since it could not compete
with better options for dynamic content in the browser.


C) Java was considered reasonably safe and secure, running in a limited
"sandbox."

,D) Oracle, who invented Java, made sure Netscape, Internet Explorer, and the
other major browsers at the time had a unified version of Java built into them. -
ANSWER C


How can you print the String "hello" in Java?


A) System.out.println("hello");


B) printf("hello");


C) "hello".print();



D) println("hello"): - ANSWER A


Suppose you have a correctly written java file, "MyClass.java". When it is
compiled, what new file will be produced? - ANSWER Myclass.class


What best describes the "String [] args" in a main() method?


A) It allows someone to pass arguments into your program when they run your
code.


B) It explains to the compiler that your program is to be run from the command
line instead of double clicked from the desktop.

,C) It defines a variable called String of type args.



D) It's not typed right and will cause a compile-time error. - ANSWER A



Name as many floating number types in Java as you know: - ANSWER Float and
Double


What keyword do you put in front of ints and doubles to make them constants? -
ANSWER Final


What will the value of x be after the following expression is evaluated?


int x = 14 % 10 + ;


A) 5.25
B) 2.65
C) 5

D) 2 - ANSWER C


Which is true of the char data type? (list all that apply)


A) It is considered one of the four "integer" variable types

, B) It represents a unicode character by mapping a numerical value to a glyph.


C) The maximum numerical value it can hold is 255.


D) char literal values are typed in java programs using double quotes (e.g. "A")



E) Some char literal values need a slash (\) in front of them. - ANSWER B and E


What is returned by Math.pow(3,2)


A) "bang!bang!bang! bang!bang!bang!"


B) 8


C) 9


D) 8.0



E) 9.0 - ANSWER E


What is printed?

Document information

Uploaded on
March 11, 2025
Number of pages
57
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers
$14.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

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.
StudySet
3.9
(637)
Sold
2736
Followers
1748
Items
19690
Last sold
1 day ago



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

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions