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






2. ++count; -- count






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






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






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






6. Cast operator has _________ precedence to division






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






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






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






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






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






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






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






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






15. Elements of input






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






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






18. An object should be self-governing - meaning that the instance data of an object should be modified only by that object.






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






20. Represents either a primitive value or an object






21. A ________________ is immutable.






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






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






24. We use an object when we have a _________ to it






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






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






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






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






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






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






31. Constructor: creates a new string object with the same characters as str.






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






33. Returns the number of characters in this stirng.






34. When a variable is declared inside a method






35. Expressed in a Java program with single quotes






36. The values it stores internally - which may be represented as primitive data or as other objects. for example - a bank account object can store a floating point number (a primitive value) that represents the balance of the account. it can also contai






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






38. The one that is invoked






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






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






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






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






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






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






45. Constructor: creates a new pseudorandom number generator.






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






47. Before you use a variable __________it






48. Variables that don't contain any data






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






50. Two floating data types: float - _______