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






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






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






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






5. Begins with a backslash character ""






6. Provides generic formatting capabilities for numbers; you don't instantiate a NumberFormat object by using the "new" operator.






7. The one that is invoked






8. Two categories of statements that control the flow of executing through a method: __________ and loops






9. All wrapper classes are defined in ___________






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






11. An explicit data value used in a program






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






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






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






15. Cast operator has _________ precedence to division






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






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






18. A ________________ is immutable.






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






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






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






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






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






24. Return type specified in the method header can be a primitive type - class name or the ________; when a method does not return any value - void is used as the return type - as is always done with the main method.






25. Returns the character at the specified index.






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






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






28. Two floating data types: float - _______






29. _____ expression evaluated first






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






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






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






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






34. The idea that we can refer to multiple types of related objects over time in consistent ways. it gives us the ability to design powerful and elegant solutions to problems that deal with multiple objects.






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






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






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






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






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






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






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






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






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






44. The Scanner class is part of ___________________






45. Methods in the Math class are ______






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






47. Each piece of data that we send to a method






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






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






50. Constructor: creates a new pseudorandom number generator.