Basic Structure

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

  1. What are Java Statements? How do they end?
    • The simplest expression like x = 4
    • These end with a ";"
  2. What are blocks?
    • Groups of statements
    • Delimited (within) {Stuff}
  3. What are methods?
    • Analogous to mathematical functions
    • Consist of one or more blocks
    • Name of method is follow by arguments, with (and)
  4. What is a class?
    • Highest level java component
    • A class is a set of blueprint
    • They define how to build an instance of an object
  5. What is the difference between object and class?
    Classes are not the actual object but the blueprints to make the object.
  6. What do classes contain?
    • Data
    • Methods to access the data
    • Methods to manipulate the data
    • Methods to perform computations using the data
  7. How to create an instance of a class?
    using the special word new
  8. How to bring a class definition?
    A class definition begins with the word (class)
  9. What is main?
    It is a method
  10. What is a method?
    • Mathematical functions
    • They perform an action of some kind
    • They return a result
  11. What are public or private qualifiers?
    • Who is allowed to use the method
    • Anyone, or any other method from the same class
  12. What are static, abstract, and final?
    • Static means the methods belongs to the blueprints and not the car!
    • There is only copy of a static method
    • Abstract,final- Soon
  13. What does each word means in public static void main ( String [] args)?
    • Public: Anyone may use this
    • Static: Only one copy belonging to MyProgram
    • Void: Returns nothing
    • Main: Name of the method
    • Args: This is a variable of type of string []
  14. What are Systems?
    System is an object, which is indicated by the capital S. This shows that the object is not an instance of System but he System itself.
  15. What is a variable?
    Is a "drawer" where you store things
  16. How to define a variable?
    • Type name;
    • Names follow the rules given earlier
    • Name begins with a lower case letter
    • lots of possible types
  17. How to obtain the value of variable?
    • Just use the name
    • Java will automatically open the drawer and tell you what is inside
  18. What are the numbers without fractional parts?
  19. Numbers with fractional parts?
    float, double
  20. What are boolean, and Characters?
    • boolean = only true or false
    • characters = char
Card Set:
Basic Structure
2016-09-12 23:12:34
Computer science
Terms/things to know for a quiz on basic structure
Show Answers: