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. Instance data should be defined with what________ visibility






2. Protection and management of an object's info. this implies that the object should be self-governing. the only changes made to the state of the object should be accomplished by that object's methods. other objects should not be able to "reach in" to






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






4. Constructor: creates a new pseudorandom number generator.






5. The one that is invoked






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






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






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






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






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






11. ____________ is instantiated in the traditional way using the new operator.






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






13. Returns the number of characters in this stirng.






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






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






16. An explicit data value used in a program






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






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






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






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






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






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






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






24. Methods in the Math class are ______






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






26. Returns the character at the specified index.






27. Variables that don't contain any data






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






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






30. sides=10;






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






32. Two floating data types: float - _______






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






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






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






36. 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:






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






38. ++count; -- count






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






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






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






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






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






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






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






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






47. Widening byte: _________ - to int - to long - to float - to double






48. Represents either a primitive value or an object






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






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