COMP 1210 Exam 1 014 - " M P Fall 2010 Exam 1 — meme...

Info icon This preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: " M P Fall 2010 Exam 1 — meme: 0 — Page e are 23. Which of the following lines directly invokes a constructor? (ii; String output = new Stringi"Red Sox"}; l/lll public static void mainiStringll argei e. modulemonstruci; {l : d. public class PaymentMethod e. None of the abcwe 29. Which of the following is a valid constructor header for the Product class? a. public int ProductIIStxing name, double price} b. public: void ProducHString name, double price) o. public Constructistring name} @ public Product” e. Both a and b are valid 30. Below four valiables are declared, of which, three are initialized in the deelamiion. Whieh of the variables cannot be set to a new value in a subsequent assignment statement? a. private double length; {a public: static final double CEILING = 65; c. String bee‘tTeam = "Patriot—5"; (1. private boolean isIt = true; e. All of the above variables length, CEILING. hest'l'eam. and islt can he reassignefi values. 3|. Which of the following is a character literal? a. private byte num; {7E} r Y . \e_' The Character class d. import java.io.*; e. char .1; 32. What is the value of x afier the foliowing code is executed? intx=14%6: ilmu ll 3. {l 1:. 2.333333 12. 2 d. l 2 1‘33 ‘J ...
View Full Document

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern