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. Three ways in which Java conversions occur: _________ conversion - promotion - casting






2. If a class contains the _________ height - it should also probably contain the methods: getHeight and setHeight






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






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






5. An explicit data value used in a program






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






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






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






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






10. Occurs when a value of one type is assigned to a variable of another type during which the value is converted to the new type.






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






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






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






14. sides=10;






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






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






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






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






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






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. Variables and constants can be referenced in any method of the class by declaring at the _________






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






23. Returns the character at the specified index.






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






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






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






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






28. Methods in the Math class are ______






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






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






31. Variables that don't contain any data






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






33. System.out object represents an output device or file; we send the println message to the System.out object to request that some text be printed






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






35. ______________ operators have higher precedence






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






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






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






39. Represents either a primitive value or an object






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






41. A name for a location in memory used to hold a data value.






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






43. Boolean type conversions are ___________






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






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






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






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






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






49. Elements of input






50. Declared in a class but not inside any particular method