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. Widening byte: _________ - to int - to long - to float - to double






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






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






4. A variable that refers to an object must be __________






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






6. When a variable is declared inside a method






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






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






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






10. ++count; -- count






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






12. Represents either a primitive value or an object






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






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






15. Before you use a variable __________it






16. The Scanner class is part of ___________________






17. A ________________ is immutable.






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






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






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






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






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






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






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






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






26. All wrapper classes are defined in ___________






27. Returns the character at the specified index.






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






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






30. Delimited by double quotation characters






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






32. A group of programming statements that is given a name. when a method is invoked - its statements are executed. a set of methods is associated with an object and defines its potential behaviors. to define the ability to make a deposit into a bank acc






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






34. New memory space is reserved for that variable every time an instance of the class that is created.






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






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






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






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






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






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






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






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






43. Two floating data types: float - _______






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






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






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






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






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






49. Begins with a backslash character ""






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