Java Definitions

The flashcards below were created by user DLeck17 on FreezingBlue Flashcards.

  1. What is a variable?
    a container that holds values that are used in a Java program
  2. What is a variable assignment?
    the variable name and type ie; int sum, double average
  3. What is a variable declaration?
    the value that you assign to a variable
  4. What makes up a method's signature?
    method name and (parameter list)
  5. What is a method parameter?
    a datatype that is passed into a method for the assigned value to be used in the method
  6. What is a method body?
    the section of code inside a method {} that does the work of the method
  7. What is a class?
    a blue print from which objects are created
  8. What is an object?
    things in memory that consist of a state(fields(variables)) and a behavior(methods)
  9. What does the public keyword mean?
    it is visible to the whole world can see and use
  10. What is the heap?
    the supply of memory that the objects are created on
  11. What does the static keyword mean?
    a method (math.absolute) or field that is not associated with a perticular instance in a class
  12. What does the private keyword mean?
    it is visible to the class only
  13. What does the final keyword mean?
    it cannot be changed once it is assigned.
  14. What does the protected keyword mean?
    it is a variable visable to the package and all subclasses, not to anyone else
  15. What is an interface?
    a collection of abstract methods. acts as a contract, when a class implements an interface, it must supply implementation for all of the methods.
  16. What is an array?
    storage device of a fixed-size in sequential order of elements of the same type.
  17. What does the abstract keyword mean?

    How is it used in conjunction with classes?
    a class that cannot be instantiated. has one or more abstract methods
  18. What is an ArrayList?
    supporst dynamic arrays that can grow as needed
  19. What is inheritance?
    the process where one object acquires the properties in hierarchical order.
  20. What is polymorphism?
    The ability to of an object to take on many forms.  a Deer is a Animal, Vegetarian, Object
  21. What does the term override mean?
    a subclass can replace a parent class method based on its own requirement. (employee objectives/manager objectives)
  22. What does the term overload mean?
    methods of same name with different parameter lists
  23. What is a HashMap?
    a collection of objects or values referanced by a set of keys to values.
  24. What is a Collection?
    an interface in Java way to store and allocate elements
  25. What is an iterator?
    provides a way to visit all elements in a collection
  26. What is the difference between a while loop and a do/while loop?
    A while loop asks for a condition first before performing more code, where a do/while performs the code and then checks the condition.
  27. What is a switch statement?
    It allows a variable to be tested for equality against a list of values. Each value is called a case, and the variable being switched on is checked for each case.
  28. What is an exception?
    it is a problem that arises during the execution of a program.
  29. What is an unchecked exception?
    a run time exception that your code is not required to catch.
  30. What is a checked exception?
    A checked exception is an exception that is typically a user error or a problem that cannot be foreseen by the programmer. For example, if a file is to be opened, but the file cannot be found, an exception occurs. your code must either catch it or throw it up the line.
  31. What is a runtime exception?
    an exception that occurs that probably could have been avoided by the programmer. As opposed to checked exceptions, runtime exceptions are ignored at the time of compilation.
  32. What does encapsulation mean?
    is the technique of making the fields in a class private and providing access to the fields via public methods, to one area of responsiblity
  33. What does it mean if a class is cohesive?
    a measure of how strongly-related each piece of functionality expressed by the source code of a software module is.
  34. What is the single responsibility principle?
    a class has only one responsibility to enable for flexiblity
  35. What is data hiding?
    preventing programmers from relying on the internal implementation details of your class, you can safely modify the implementation without worrying that you will break existing code that uses the class
  36. 36) What does it mean if one class is derived from another class?
    extension of one class from another. a cat is an animal.
  37. What does it mean if one class extends another class?
    it inherits the fields and methods of the parent class, adding functionality to the program
  38. What is a base class?
    Is the parent class which all sub classes are derived from.
  39. What is an abstract base class?
    Abstract classes may not be instantiated, and require subclasses to provide implementations for the abstract methods.
  40. What is specialization?
    if Class A is derived from ClassB, it contains all the characteristics of B but adds onto it.
  41. What does it mean to be loosely coupled?
    the internal implementation of one class does not effect the classes that use it.
  42. Why is it a good idea to split your applications into layers?
    so that it gives you maximum flexibility to change aspects of your programming without breaking all of it.
  43. What does it mean to cast a variable?
    telling the compliler in this instant, to treat one type as another type float average;     (int)average
  44. What does a finally block do?
    try/catch/finally: it runs no matter what if you do or don't catch an exception
  45. What is a try/catch?
    Code within a try/catch block is referred to as protected code. the code within is attempted in run time, but if it fails, the thrown exception is caught by the Catch blocks below it.
  46. What does the throws keyword mean?
    it means if the code has run into an error and the error message needs to be sent somewhere to be dealt with.
  47. How is the import keyword used?
    it allows a programmer to bring a class in from a different package to be used.
  48. What is a package?
    a grouping of related types(classes, interfaces, enumerations and annotations ) providing access protection and name space management.
  49. What is JavaDoc?
    it is notes and comments created for a progam to explain how and why you have chosen to do what you did.
  50. What is scope?
    where in the program that you can use a variable wether the whole or just one method
  51. What does API stand for?
    Applicating Programing Interface
  52. What is an accessor?
    a method is used to return the value of a private field (getters)
  53. What is a mutator?
    a method used to set a value of a private field. (setter)
  54. What is a constructor?
    have no return type, must have same name as their class and can only take access modifiers( no abstract, final, native, static, or synchronized modifiers) Is the method that runs when you call on 'new'
  55. what does the term generics?
    give us type safety in Maps and Arrays <Integer, 'Object'>
Card Set
Java Definitions
Java terms used in the programming world
Show Answers