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. If a class contains the _________ height - it should also probably contain the methods: getHeight and setHeight






2. White space characters such as space characters - tabs - and new lines that separate the elements of input






3. Before you use a variable __________it






4. A ________________ is immutable.






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






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






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






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






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






10. Delimited by double quotation characters






11. Changes a particular value - e.g.setX - where X is the value they are setting.






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






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






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






15. Boolean type conversions are ___________






16. How classes are created from other classes. the definition of one class can be based on another class that already exists. inheritance is a form of software reuse - capitalizing on the similarities between various kinds of classes that we want to cre






17. Since an object ref var holds the address of the object - it can be thought of as a ____ to the location in memory where the object is held






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






19. The Scanner class is part of ___________________






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






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






22. sides=10;






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






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






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






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






27. Elements of input






28. Methods in the Math class are ______






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






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






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






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






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






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






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






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






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






38. The fundamental characteristics that currently define the object. for example - part of a bank account's state is its current balance.






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






40. An explicit data value used in a program






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






42. Begins with a backslash character ""






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






44. All numeric types are _______ - meaning both positive and negative values can be stored in them






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






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






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






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






49. A special method that has the same name as the class. After the "new" operator creates the object it is invoked to help set it up initially






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