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 3 out of 19 pages
Exam (elaborations)

CS 1102 Graded Quiz with Answers. 100% proven pass rate. Rated A+ Document Content and Description Below

Document preview thumbnail
Preview 3 out of 19 pages

CS 1102 Graded Quiz with Answers. 100% proven pass rate. Rated A+ Document Content and Description Below To declare a constant MAX_LENGTH as a member of the class, you write - final static double MAX_LENGTH = 99.98; What is the output of the following code? import .Date; public cl ass Test { public static void main(String[] args) { Date date1 = new Date(); Date date2 = new Date(); S((date1 == date2) + " " + (Class() == Class())); } } - false true The abbreviation OOP stands for: - Object oriented programming In the following code, what is the newStudent method called: public class newStudent { public String name; public int age; public newStudent() { age=5; name = "Jim Jones"; } } - constructor Consider the following code, which output is correct? public class Student { int age; static int age2 = 3; public static void main(String[] args) { Student student1; Student student2; Student student3; student1 = new Student(); = 10; student2 = student1; -= 5; student3 = new Student(); Sln(+" "+); } } - 5 5 In the following code what is the getName() method referred to: public class Student { public String name; public int age; public String getName() { return name; } public void setName( String newName ) { name = newName; } } - getter method A method that is associated with an individual object is called: - an instance method In the following code what is the setName() method referred to: public class Student { public String name; public int age; public String getName() { return name; } public void setName( String newName ) { name = newName; } } - setter method What is the output of the following code? public class Test { public static void main(String[] args) { String s1 = new String("Welcome to Java!"); String s2 = new String("Welcome to Java!"); if (s1 == s2) Sln("s1 and s2 reference to the same String object"); else Sln("s1 and s2 reference to different String objects"); } } - s1 and s2 reference to different String objects Which of the following code in A or B, or both creates an object of the .Date class? A: public class Test { public Test() { new .Date(); } } B: public class Test { public Test() { .Date date = new .Date(); } } - Both True or False: The variables that an object contains are called local variables. - False True or False: The area of memory that objects reside in is known as the stack. - False True or False: In the following code, the object created from class Student is stored in the variable myStudent. Student myStudent; myStudent = new Student(); - False True or False: When a programmer neglects to delete objects that are n


Document information

Uploaded on
May 9, 2023
Number of pages
19
Written in
2022/2023
Type
Exam (elaborations)
Contains
Questions & answers
$8.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.
Savior
3.5
(25)
Sold
95
Followers
70
Items
3389
Last sold
6 months 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

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