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. The location at which a variable is declared defines its scope - which is the area within a program in which the variable can be referenced.






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






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






4. The act of creating an object using the "new" operator






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






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






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






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






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






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






11. Delimited by double quotation characters






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






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






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






15. Expressed in a Java program with single quotes






16. Modifier>type/void>identifier>parameters>method body






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






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






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






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






21. Returns the number of characters in this stirng.






22. sides=10;






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






24. Sets the scanner's delimiting pattern.






25. Returns the character at the specified index.






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






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






28. Boolean type conversions are ___________






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






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






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






32. _____ expression evaluated first






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






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






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






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






37. ______________ operators have higher precedence






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






39. When a variable is declared inside a method






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






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






42. The Scanner class is part of ___________________






43. Before you use a variable __________it






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






45. Only two valid values: true and false; can indicate whether a particular condition is true - but can also be used to represent any situation that has two states - such as a light bulb being on or off






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






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






48. Constructor: creates a new pseudorandom number generator.






49. The blueprint of an object. establishes the kind of data an object of that type will hold and defines the methods that represent the behavior of such objects. however - a class contains no space to store data. each object has space for its own data -






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