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. sides=10;






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






3. Boolean type conversions are ___________






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






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






6. Delimited by double quotation characters






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






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






9. Attempts to find the next occurence of the specified pattern - ignoring delimiters






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






11. The fundamental characteristics that currently define the object. for example - part of a bank account's state is its current balance.






12. Two floating data types: float - _______






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






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






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






16. Count++; count--






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






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






19. Automatically imported because they are fundamental and can be thought of as basic extensions to the language.






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






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






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






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






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






25. Five steps of problem-solving: ____________ the problem - Designing a solution - Considering alternatives to the solution and refining the solution - Implementing the solution - Testing the solution and fixing any problems that exist






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






27. All wrapper classes are defined in ___________






28. Represents either a primitive value or an object






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






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






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






32. Methods in the Math class are ______






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






34. If a class contains the _________ height - it should also probably contain the methods: getHeight and setHeight






35. Expressed in a Java program with single quotes






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






37. Returns the number of characters in this stirng.






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






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






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






41. A null reference indicates that a variable does not refer to an object






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






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






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






45. ______________ operators have higher precedence






46. Begins with a backslash character ""






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






48. Allows all classes in the java.util package to be referenced in the program without qualfying each reference.






49. A method that returns a value must have a _________






50. ++count; -- count