java

Card Set Information

Author:
Anonymous
ID:
68619
Filename:
java
Updated:
2011-02-24 03:50:49
Tags:
Programming Java CSC116 NCSU
Folders:

Description:
Intro Java terms for CSC 116 at NCSU
Show Answers:

Home > Flashcards > Print Preview

The flashcards below were created by user Anonymous on FreezingBlue Flashcards. What would you like to do?


  1. compiler
    translates our English into 0s and 1s for the processor to understand
  2. source code
    Human written code
  3. byte code
    a class file, which contains 0s and 1s also called machine code
  4. case-sensitive language
    Capital letters and lowercase letters are interpreted differently
  5. public class
    The start of every Java program and containsthe code: public class {}
  6. main method
    public static void main(String[ ] args) {}
  7. Code to print to system?
    System.out.println(“text”);
  8. memory
    What a computer uses to store information it needs
  9. variable
    is placeholder for data in a computer program
  10. identifier
    The name of a variable
  11. keyword/reserved word
    Words that are set aside for use in the Java language
  12. int
    Whole Numbers (5, 10, 100,-50)
  13. double
    Decimal Numbers (5.5,10.0583)
  14. char
    A single Character (‘A’,‘b’, ‘&’)
  15. String
    Text
  16. assignment operator
    =
  17. initialization of the variable
    Giving a variable an initial value
  18. concatenation operator
    +
  19. How does Java compute concerning the equal sign?
    The right side of the equal sign is computed first.
  20. 5 % 2 calculates what?
    The remainder so the answer would be 1.
  21. Syntax error
    grammatical problem with the source code.
  22. Runtime error
    when your source code compiles, but when you execute it an error occurs
  23. Logic error
    is when the code has correct syntax, causes no errors during execution, but it produces undesired results
  24. Comments
    are sections of our source code that are ignored by the compiler
  25. Single Line Comments
    // comment
  26. Area Comments
    /* comment */
  27. Javadoc
    • /**
    • *
    • *
    • */
  28. All _____ files start with public class and the name of the class?
    Java
  29. The ______ tells Java where your program should begin execution?
    main method
  30. promotion
    When we divide two numbers where one is an int and the other is a double, the integer value is temporarily changed into a double for the operation.
  31. casting
    • When we want to force Java to temporarily change a value’s type, we can cast the type into something else.
    • (double) 5 // Casts 5 into 5.0
  32. constant
    is a variable whose value can not be changed. Any attempt to do so will cause a syntax error.
  33. how do we decade a variable as a constant?
    • we use the keyword final before the declaration
    • final double PI = 3.14;
  34. methods
    is a group of code that performs a single task
  35. How does a simple method begin?
    public static void ( ) {}
  36. calling or invoking a method means what?
    New methods you write must be told to run from the main method which is invoking or calling the method.
  37. parameters
    When a method needs information to complete its task, it accepts that information through the use of parameters
  38. give an example of a parameter
    public static void method(int x)
  39. argument
    The value you provide in the parenthesis gets stored into the parameter in the method. The value you provide is known as an argument
  40. promotion with integers concerning doubles
    Java will “promote” an integer value into a double value if an integer is given where a double is expected
  41. local variable
    Any variable declared inside a method only exists inside that method
  42. A variable declared inside
    a method is known as one that is ______ to
    that method ?
    local
  43. class variables and instance variables
    kinds of variables that may be used across every method
  44. The Basic Method
    public static void method_name(){}
  45. Methods can send back a value to the location in which the method was called, this is called what?
    returning a value
  46. We write void in the method what does it mean?
    void is written when the method does not return a value
  47. If we want a method to return a value, we replace the word void with the data type that will be returned. What is this called?
    This portion of the method signature is called the method’s return type
  48. The Keyword return
    To return a value, we use the keyword return, followed by the value to be returned.
  49. tags
    contained in a Javadoc and begins with @ and followed by author or version
  50. How would you give someone information about your code without giving them source code?
    javadoc
  51. A example method signature is what?
    public static <return_type> <method_name>(params) {….
  52. public static <return_type> <method_name>(params) {} , define the bold terms
    • Where return_type: is the type of value that the method returns. If nothing is returned, we use the keyword void
    • method_name: is the name of your method
    • params: are all the parameters the method uses to accept value

What would you like to do?

Home > Flashcards > Print Preview