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. If a class contains the _________ height - it should also probably contain the methods: getHeight and setHeight






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






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






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






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






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






8. Variables that don't contain any data






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






10. Boolean type conversions are ___________






11. Methods in the Math class are ______






12. ______________ operators have higher precedence






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






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






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






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






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






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






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






20. Cast operator has _________ precedence to division






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






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






23. A ____________ and definition always give the parameter list in parentheses after the method name. if there are no parameters - an empty set of parentheses is used






24. Sets the scanner's delimiting pattern.






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






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






27. All wrapper classes are defined in ___________






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






29. ++count; -- count






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






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






32. Two floating data types: float - _______






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






34. When a variable is declared inside a method






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






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






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






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






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






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






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






42. An object has behaviors - which are defined by the ________ associated with that object.






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






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






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






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






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






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






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






50. Delimited by double quotation characters







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