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. Count++; count--






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






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






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






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






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






7. Boolean type conversions are ___________






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






9. The automatic conversion between a primitive value and a corresponding wrapper object.






10. Before you use a variable __________it






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






12. A Java operator that is specified by a type name in parentheses; truncates rather than rounds; useful in division if u want an integer to be treated as a float or double






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






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






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






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






17. Expressed in a Java program with single quotes






18. Represents either a primitive value or an object






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






20. A method that returns a value must have a _________






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






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






23. Cast operator has _________ precedence to division






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






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






26. An explicit data value used in a program






27. sides=10;






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






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






30. The one that is invoked






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






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






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






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






35. Constants are ______ because the can't be changed once you use the final modifier






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






37. All wrapper classes are defined in ___________






38. Begins with a backslash character ""






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






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






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






42. The Scanner class is part of ___________________






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






44. Delimited by double quotation characters






45. Variables that don't contain any data






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






47. Returns the character at the specified index.






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






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






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