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. Eight primitive data types: four subsets of integers - two subsets of ________ - a character data type - and a boolean data type






2. Variables that don't contain any data






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






4. The Scanner class is part of ___________________






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






6. When a variable is declared inside a method






7. Instance data should be defined with what________ visibility






8. A group of programming statements that is given a name. when a method is invoked - its statements are executed. a set of methods is associated with an object and defines its potential behaviors. to define the ability to make a deposit into a bank acc






9. Returns the number of characters in this stirng.






10. ++count; -- count






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






12. This declaration creates a Scanner object that reads input from the keyboard






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






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






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






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






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






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






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






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






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






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






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






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






25. Returns the character at the specified index.






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. Methods in the Math class are ______






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






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






30. An explicit data value used in a program






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






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






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






34. Represents either a primitive value or an object






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






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






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






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






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






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






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






42. A ________________ is immutable.






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






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






45. All wrapper classes are defined in ___________






46. Expressed in a Java program with single quotes






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






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






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






50. Before you use a variable __________it