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. The act of creating an object using the "new" operator






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






3. The idea that we can refer to multiple types of related objects over time in consistent ways. it gives us the ability to design powerful and elegant solutions to problems that deal with multiple objects.






4. The order in which statements are executed in a running program






5. Delimited by double quotation characters






6. Declared in a class but not inside any particular method






7. Two categories of statements that control the flow of executing through a method: __________ and loops






8. When a variable is declared inside a method






9. format for constants: all upper-case; separated by ________






10. Returns a string containing the specified number formatted according to this object's pattern.






11. Returns the int corresponding to the value stored in the specified string






12. Sets the scanner's delimiting pattern.






13. The Scanner class is part of ___________________






14. The blueprint of an object. establishes the kind of data an object of that type will hold and defines the methods that represent the behavior of such objects. however - a class contains no space to store data. each object has space for its own data -






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






16. ____________ is instantiated in the traditional way using the new operator.






17. Returns an integer indicating if this string is lexically before - equal to - or lexically after the string str.






18. We use an object when we have a _________ to it






19. A variable that refers to an object must be __________






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






21. The fundamental characteristics that currently define the object. for example - part of a bank account's state is its current balance.






22. Protection and management of an object's info. this implies that the object should be self-governing. the only changes made to the state of the object should be accomplished by that object's methods. other objects should not be able to "reach in" to






23. Behaviors associated with a bank account (which include the ability to make deposits and withdrawals)






24. If a class contains the _________ height - it should also probably contain the methods: getHeight and setHeight






25. Provides read-only access to a particular value - e.g. getX where X is the value to which it provides access.






26. They clarify the role a certain number has in the program.






27. A ________________ is immutable.






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






29. 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.






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






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






32. Before you use a variable __________it






33. Instance data should be defined with what________ visibility






34. All numeric types are _______ - meaning both positive and negative values can be stored in them






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






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






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






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






39. Returns the next input token as the indicated type.






40. Returns true if this string contains the same characters as str (without regard to case) and false otherwise.






41. New memory space is reserved for that variable every time an instance of the class that is created.






42. Allows all classes in the java.util package to be referenced in the program without qualfying each reference.






43. Automatically imported because they are fundamental and can be thought of as basic extensions to the language.






44. 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






45. 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.






46. Provide various methods related to the management of the associated primitive type. Used when we create an object that serves as a container to hold various types of other objects - and we want the object to hold a simple integer value. In this case






47. 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






48. The values passed into a method in an invocation; these are called the arguments to the method






49. 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.






50. Begins with a backslash character ""