1 A ____________ inherited by a sub-class has indirect access to - TopicsExpress



          

1 A ____________ inherited by a sub-class has indirect access to all of the private members of the super class. Derived class Protected nested class Extended class 2 The _________ internally creates a runtime system that helps the execution of code by loading the .class file, managing the memory, and performing garbage collection. JVM JDK JBT 3 The ___________ method of the string class returns the index of the first occurrence of the specified character or string within a string. Concat() CharAt() indexOf() 4 The _______ method of the StringTokenizer class returns true if there is atleast one token in the string after the current position hasMoreTokens() hasMoreElements() countTokens() 5 The _________ allows an overriding method to return an object whose type is a sub-class of the type returned by the overridden method in the superclass. Covariant return types Method hiding Method overloading 6 The _________ string class method returns the string representation of the specified argument. valueOf() toCharArray() endsWith() 7 Constructor overloading can be achieved with (chọn nhiều câu) Same number of parameters and different data types. Different number of parameters with same data type. Same number of parameters and data types Different number of parameters with data types 8 The advantages of Instance Methods are: 1. Instance methods can be overridden and overloaded. 2. Overridden instance methods can have a different return type provided that the new type is a sub-class of the declared return type of the overridden method 3. Instance methods can only be accessed by using an instance of the class using the dot operator. 4. Static variables can be accessed from the instance methods. Statement 1, 2, 3 Statement 2, 3, 4 Statements 1, 2, 3, 4 9 Learn Java By Example A format specifier always starts with a percent sign. Which of the following is the syntax for a format specifier? 1. %[arg_index$] [flags] [width] [precision] conversion character 2. %[arg_index$] [flags] [width] [.precision] conversion character 3. %[arg_index$] [width] [.precision] conversion character 4. %[arg_index$] [flags] [.precision] conversion character 1 2 3 4 10 Learn Java By Example When ______________ statements are used, there are no conflicts between the case constants in inner switch with those in the outer switch. Embedded switch Nested switch Layered switch Switch case 11 Learn Java By Example What is a function of a while statement? Test the result of the boolean expression Avoid the conflicts between inner and outer switches Repeat a block of code while the condition is true 12 Learn Java By Example Java provides some statements that will change the flow of control based on conditions. __________ statement stops the execution of the innermost loop in the program and starts processing the next line of code after the block. break jump continue change 13 Learn Java By Example The _______________ statement causes the current iteration of the innermost loop to cease and the next iteration of the same loop to start. jump iterate cease continue 14 Learn Java By Example _______________ usually tests the loop control variable against a targeted value in a FOR statement. boolean expression iteration expression initialization expression 15 Learn Java By Example What is the function of a labeled statement? To indicate the nested loop to continue with the next iteration. To transfer the control directly to the conditional expression that controls the loop. To stop the execution of the remaining body of the loop 16 Learn Java By Example What is known as a base case? Stopping recursion to save the memory Calling a recursive method Creating actual objects Assigning values to element 17 Learn Java By Example Every recursive method has some characteristics. When the method calls itself and pushes values on the stack, then this phase is known as ______________. Recursive depth Stack overflow Endless recursion Winding 18 Learn Java By Example _______________ is an enumerated type with a fixed set of possible values and does not vary at the time of execution. Dynamic enumerated type Static enumerated type Stable enumerated type Still enumerated type 19 Learn Java By Example _________________ indicates that the heap space they occupy needs to be recycled so that the space is available for subsequent new objects. Garbage collection Object creation Recycle bin Recycle heap 20 Learn Java By Example You can keep track of the objects that are referenced by the executing program so as to finalize and free unreferenced objects by using _______________. Compiler Garbage Collected Heap Java Virtual Machine Stack 21 Learn Java By Example ________________ method returns the number of Unicode code points between two indices in the String. codePointAt() codePointBebore() codePointCount() startsWith() 22 Learn Java By Example What is the function of valueOf()? Converts the characters in the String to lower case. Returns the string representation of the specified argument. Copies the content of the String to a new character array. Compares two strings and returns a boolean value. 23 Learn Java By Example What is the function of gerChars()? Returns the character value at the specified index. Deletes a character at the specified position. Copies specified number of character into an array Returns the total number of characters from the StringBuilder object. 24 ________ is a process that converts an object’s internal state into a binary stream of bytes. Package conversion Method Modifier Serialization 25 All ___________ in a class must be placed after the package statement and before the class declaration. Import statements Access specifiers Method modifiers đề thi ngày mai nè -_- Có Phải Huy Đâu
Posted on: Wed, 10 Sep 2014 13:21:33 +0000

Trending Topics



Recently Viewed Topics




© 2015