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






2. Eight primitive data types: four subsets of integers - two subsets of ________ - a character data type - and a boolean data type






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






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






5. ++count; -- count






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






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






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






9. Count++; count--






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






11. Returns the character at the specified index.






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






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






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






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






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






17. The act of creating an object using the "new" operator






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






19. The classes of the Java standard class library are grouped into __________.






20. When two variables contain the same address and therefore refer to the same object; one important implication of _________ is that when we use one ref to change an object - it is also changed for the other reference because there is really only one o






21. Variables and constants can be referenced in any method of the class by declaring at the _________






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






23. Since an object ref var holds the address of the object - it can be thought of as a ____ to the location in memory where the object is held






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






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






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






27. How classes are created from other classes. the definition of one class can be based on another class that already exists. inheritance is a form of software reuse - capitalizing on the similarities between various kinds of classes that we want to cre






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






29. Returns a new string consisting of this string concatenated with str.






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






31. The only purpose of a private method is to help other methods of the class do their job. they are referred to as _________






32. Part of the java.util class; picks a number at random out of a range of values.






33. Instructs the compiler to reserve a portion of main memory space large enough to hold a particular type of value and indicates the name by which we refer to that location






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






35. All wrapper classes are defined in ___________






36. sides=10;






37. Instance data should be defined with what________ visibility






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






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






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






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






42. declaration that creates a String variable that holds a reference to a String object; an object variable doesn't hold an object itself - it holds the address of an object






43. The Scanner class is part of ___________________






44. An object has behaviors - which are defined by the ________ associated with that object.






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






46. Returns a new string that is identical with this string except that every occurrence of oldChar is replaed by newChar






47. A ________________ is immutable.






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






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






50. Begins with a backslash character ""