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. This declaration creates a Scanner object that reads input from the keyboard






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






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






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






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






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






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






8. Methods in the Math class are ______






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






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






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






12. The declarations of object variables have a similar structure to the declaration of _______________






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






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






15. A ________________ is immutable.






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






17. Instructs the compiler to reserve a portion of main memory space large enough to hold a particular type of value and indicates the name by which we refer to that location






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






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






20. Instance data should be defined with what________ visibility






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






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






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






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






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






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






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






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






29. Two floating data types: float - _______






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






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






32. _____ expression evaluated first






33. ______________ operators have higher precedence






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






35. The automatic conversion between a primitive value and a corresponding wrapper object.






36. Variables that don't contain any data






37. Returns the int corresponding to the value stored in the specified string






38. The values passed into a method in an invocation; these are called the arguments to the method






39. The only purpose of a private method is to help other methods of the class do their job. they are referred to as _________






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






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






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






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






44. Constructor: creates a new pseudorandom number generator.






45. sides=10;






46. Delimited by double quotation characters






47. The one that is invoked






48. Cast operator has _________ precedence to division






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






50. Expressed in a Java program with single quotes