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. A method that returns a value must have a _________






3. Represents either a primitive value or an object






4. _____ expression evaluated first






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






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






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






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






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






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






11. A ________________ is immutable.






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






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






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






15. Returns the character at the specified index.






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






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






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






19. Boolean type conversions are ___________






20. Delimited by double quotation characters






21. An explicit data value used in a program






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






23. The one that is invoked






24. Sets the scanner's delimiting pattern.






25. ______________ operators have higher precedence






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






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






28. An object in Java - defined by the class String






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






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






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






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






33. Begins with a backslash character ""






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






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






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






37. ++count; -- count






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






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






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






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






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






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






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






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






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






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






48. Two floating data types: float - _______






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






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







Sorry!:) No result found.

Can you answer 50 questions in 15 minutes?


Let me suggest you:



Major Subjects



Tests & Exams


AP
CLEP
DSST
GRE
SAT
GMAT

Most popular tests