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






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






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






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






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






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






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






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






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






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






11. sides=10;






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






13. Returns the character at the specified index.






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






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






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






17. Occurs when a value of one type is assigned to a variable of another type during which the value is converted to the new type.






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






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






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






21. ______________ operators have higher precedence






22. A ________________ is immutable.






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






24. Expressed in a Java program with single quotes






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






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






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






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






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






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






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






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






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






34. Declared in a class but not inside any particular method






35. Before you use a variable __________it






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






37. Instance data should be defined with what________ visibility






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






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






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






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






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






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






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






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






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






47. An explicit data value used in a program






48. Elements of input






49. _____ expression evaluated first






50. Returns true if the scanner has anotehr token in its input.