Java: Study guide for Test 1
Java: Study guide for Test 1 COMP1210
Popular in Fundamentals of Computing I
Popular in Arts and Humanities
This 0 page Study Guide was uploaded by SloanTheSloth on Wednesday February 10, 2016. The Study Guide belongs to COMP1210 at Auburn University taught by James H Cross in Winter 2016. Since its upload, it has received 138 views. For similar materials see Fundamentals of Computing I in Arts and Humanities at Auburn University.
Reviews for Java: Study guide for Test 1
Report this Material
What is Karma?
Karma is the currency of StudySoup.
You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!
Date Created: 02/10/16
Comp 1210 Study guide STUDENT MADE 1 TrueFalse myVariable and myvariable are considered to be the same identi er in Java a True b False 2 The java compiler processes to create a Java source code machine code b Machine code Java source code c Java source code Java bytecode d Java bytecode machine code e Java bytecode Java source code 3 Which of the following is a widening conversion a long to byte b short to byte c int to double d int to short e oat to int 4 What is the value of myNum after the following code is executed int myNum 37 5 a 2 b 70 c 7 d 20 5 Two 0 more references that refer to the same object are called a Relatives b Twins c Aliases d Siblings e None of the above 6 occurs when the new operator is used to create an object a Encapsulation b Noti cation c Proclamation d lnstantiation e Declaration 7 If your software compiles and executes without complaint but produces incorrect results then your code contains what kind of error Style error Runtime error Compiletime error Logical error User error Duncp 8 TrueFalse Syntax refers to the grammar of the programming language while semantics refers to the meaning of the language a True b False 9 Which of the following is an escape sequence a 39e39 b n C d e Boolean 10Which of the following is an invalid identi er a funny b bookmark c num2 dnum2 e num 11Which of the following represents the correct increasing ranges of values integer types from left to right Byte short int long Long int short byte Byte int short long Long short byte int None of the above 12The expression quotJavaquot 1 2 3 evaluates to Java6 Java15 Java123 This is an illegal expression 13 is invoked to create an object a A public variable b A constructor c The main method d e mane9 apem A method with a return type n an object is created space is reserved in memory for that object39s Instance data Methods Class header Constructor Local variables 15 A private method is referred to as an method while a public method is referred to as an method a Static class b Support service c Class static d Service static 16A class diagram shows the relationships between classes in a project a JDK b ASCII c UML d IDE 17An method changes the of the object a State accessor mane9 Mutator behaviors Accessor state Static state Mutator state 18The relationship between a class and an object is best described as a Objects are instances of classes b Objects and classes are the same thing c Classes are programs while objects are variables d Objects are the instance data of classes 19Which of the following is not a reserved word a int b void c main d oat e class 20Parameters to methods always appear within a Brackets b Parentheses c Quotation marks d Any type of braces 21Which of the following best describes the variable num lnteger num new lnteger10 a A constant eld b A static variable c A primitive type variable d A reference type variable 22Which of the following is a character literal a private byte num b 39y39 c The character class d import javaio e char a 00no 23Which of the following is a formal parameter a output b String c double d None of the above 24Which of the following lines of code correctly instantiates a CreditCard object a CreditCard cc new CreditCardmyName ccRate b CreditCard new CreditCardString myName double ccRate c CreditCard cc new CreditCard34 quotjanequot d CreditCard cc CreditCardinstantiate 25Which of the following lines of code correctly invokes the payBalance method a CreditCardpayBalance b CreditCardpayBalanceamt c ccpayBaanceamt d ccpayBaancedoubIe amt 26n which of the following lines is a static method invoked a ccsetHeight6 b public static nal int ACE 1 c int letters strnputength d double x DoubleparseDoubequot23quot 27Which of the following lines would print the String referenced by the variable eventName in double quotes a SystemoutprintlnquotquoteventNamequotquot b Systemoutprintnquotquotquot eventNamequotquotquot c SystemoutprintneventName d SystemoutprintlnquoteventNamequot 28Which of the following represents the Java interpreter on your computer and is responsible for running yourJava program a Runexe b javacexe c javaexe d jGRASPexe 29Which of the following is executed rst when you run yourJava application a The main method of your class b The constructor of your class c The toString method of your class d None of the above 30Which of the following provides the object equivalent of a primitive type a System class b The Scanner class c Math Class d Wrapper Class AN SWE R KEY HHHHHH OWNP P PWF wgtbhgtwwgtuungtnnw 18A 19C 20B 21D 22B 23D 24A 25B 26D 27B 28C 29A 30D
Are you sure you want to buy this material for
You're already Subscribed!
Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'