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. White space characters such as space characters - tabs - and new lines that separate the elements of input






2. Part of the standard Java class library - provides convenient methods for reading input values of various types. the input can come from various sources - including data typed interactively by the user or data stored in a file; the Scanner class can






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






4. Sets the scanner's delimiting pattern.






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






6. Represents either a primitive value or an object






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






8. sides=10;






9. _____ expression evaluated first






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






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






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






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






14. Begins with a backslash character ""






15. An explicit data value used in a program






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






17. Returns all input remaining on the current line as a character string.






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






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






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






21. Two floating data types: float - _______






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






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






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






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






26. Expressed in a Java program with single quotes






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






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






29. If the string object str holds the string "987" - the following line of code converts the string into the integer variable 987 and stores that value in the int variable num:






30. Variables that don't contain any data






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






32. Instance data should be defined with what________ visibility






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






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






35. Modifier>type/void>identifier>parameters>method body






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






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






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






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






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






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






42. Methods in the Math class are ______






43. The one that is invoked






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






45. Count++; count--






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. Constructor: creates a new pseudorandom number generator.






48. Five steps of problem-solving: ____________ the problem - Designing a solution - Considering alternatives to the solution and refining the solution - Implementing the solution - Testing the solution and fixing any problems that exist






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






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