Test your basic knowledge |

Object Oriented Programming

Subject : it-skills
Instructions:
  • Answer 50 questions in 15 minutes.
  • If you are not ready to take this test, you can study here.
  • Match each statement with the correct term.
  • Don't refresh. All questions and answers are randomly picked and ordered every time you load a test.

This is a study tool. The 3 wrong answers for each question are randomly chosen from answers to other questions. So, you might find at times the answers obvious, but you will see it re-enforces your understanding as you take the test each time.
1. Returns a string containing the specified number formatted according to this object's pattern.






2. Methods that provide services to the client must be declared with public visibility so that they can be invoked by the client.






3. Returns a new string that is a subset of this string starting at index offset and extending through endIndx-1;






4. System.out object represents an output device or file; we send the println message to the System.out object to request that some text be printed






5. A class usually provides services to access and modify __________






6. Widening byte: _________ - to int - to long - to float - to double






7. If the string object str holds the string "987" - the following line of code converts the string into the integer variable 987 and stores that value in the int variable num:






8. Defined and then used as the type of a variable when it is declared; establishes all possible values of a variable of that type by listing - or enumerating - them.






9. Constructors do not even _______; therefore they cannot return a value.






10. A special method that has the same name as the class. After the "new" operator creates the object it is invoked to help set it up initially






11. ++count; -- count






12. Return type specified in the method header can be a primitive type - class name or the ________; when a method does not return any value - void is used as the return type - as is always done with the main method.






13. _____ expression evaluated first






14. A ____________ and definition always give the parameter list in parentheses after the method name. if there are no parameters - an empty set of parentheses is used






15. All wrapper classes are defined in ___________






16. Control access to the members of a class. the reserved words public and private are visibility modifiers that can be applied to the variables and methods of a class.






17. A null reference indicates that a variable does not refer to an object






18. Five steps of problem-solving: ____________ the problem - Designing a solution - Considering alternatives to the solution and refining the solution - Implementing the solution - Testing the solution and fixing any problems that exist






19. Three ways in which Java conversions occur: _________ conversion - promotion - casting






20. After an object has been instantiated - we set the _________ to access its methods






21. Returns true if the scanner has anotehr token in its input.






22. Includes the type of teh return value - the method name - and the list of parameters that the method accepts.






23. Constructor: creates a new pseudorandom number generator.






24. Sets the scanner's delimiting pattern.






25. Instance data should be defined with what________ visibility






26. The values it stores internally - which may be represented as primitive data or as other objects. for example - a bank account object can store a floating point number (a primitive value) that represents the balance of the account. it can also contai






27. Returns the next input token as a character string.






28. ______________ operators have higher precedence






29. Represents either a primitive value or an object






30. Part of the standard Java class library - provides convenient methods for reading input values of various types. the input can come from various sources - including data typed interactively by the user or data stored in a file; the Scanner class can






31. Constructor: creates a new string object with the same characters as str.






32. A value that is passed into a method when it is invoked






33. Variables that don't contain any data






34. Examples of Scanner ________: Scanner (InputStream source) - Scanner(File source) - Scanner(String source)






35. Returns a new string identical to this string except all uppercase letters are converted to their lowercase equivalent.






36. Even though a method may not take parameters - _________ are still necessary to indicate that a method is being invoked






37. Also called a selection statement b/c it allows us to choose which statement will be executed next.






38. In the header of a method specifies he types of the values that are passed and the names by which the called method will refer to those values.






39. Occurs automatically when certain operators need to modify their opeands in order to perform the operation






40. Returns all input remaining on the current line as a character string.






41. Methods in the Math class are ______






42. A combo of one or more operators and operands that usually perform a calculation; operands can be literals - constants - variables - or other sources of data






43. Changes a particular value - e.g.setX - where X is the value they are setting.






44. Occurs when a value of one type is assigned to a variable of another type during which the value is converted to the new type.






45. sides=10;






46. The declarations of object variables have a similar structure to the declaration of _______________






47. Before you use a variable __________it






48. White space characters such as space characters - tabs - and new lines that separate the elements of input






49. Every object has two things: a state and a _____ of behaviors






50. The location at which a variable is declared defines its scope - which is the area within a program in which the variable can be referenced.