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. Sets the scanner's delimiting pattern.






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






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






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






5. Constructor: creates a new pseudorandom number generator.






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






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






8. Expressed in a Java program with single quotes






9. Returns the character at the specified index.






10. Before you use a variable __________it






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






12. Making it difficult - if not impossible - for code outside of a class to "reach in" and chnage the value of a variable that is declared inside that class.






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






14. An object in Java - defined by the class String






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






16. An object should be self-governing - meaning that the instance data of an object should be modified only by that object.






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






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






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






20. A set of classes that supports the development of programs






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






22. Returns the number of characters in this stirng.






23. Four integer data types: byte - short - int - _____






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






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






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






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






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






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






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






31. The names of the parameters in the header of the method declaration






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






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






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






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






36. Specifies the packages and classes that will be used in a program so that the fully qualified name is not necessary with each reference.






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






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






39. ______________ operators have higher precedence






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






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






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






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






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






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






46. Attempts to find the next occurence of the specified pattern - ignoring delimiters






47. Instance data should be defined with what________ visibility






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






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






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.