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






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






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






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






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






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






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






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






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






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






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






12. A value that is passed into a method when it is invoked






13. Returns the number of characters in this stirng.






14. Expressed in a Java program with single quotes






15. _____ expression evaluated first






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






17. Variables and constants can be referenced in any method of the class by declaring at the _________






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






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






20. Elements of input






21. Returns a string containing the specified number formatted according to this object's pattern.






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






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






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






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






26. Cast operator has _________ precedence to division






27. Count++; count--






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






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






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






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






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






33. Begins with a backslash character ""






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






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






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






37. The one that is invoked






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






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






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






41. sides=10;






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






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






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






45. Boolean type conversions are ___________






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






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






48. Constructor: creates a new pseudorandom number generator.






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






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