Preview

Object Oriented Programming Midterm

Better Essays
Open Document
Open Document
2088 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Object Oriented Programming Midterm
Java is simple such as it does not have any pointers, it has automatic memory allocation and garbage collector, and it has multiple inheritance with interfaces. Java is a platform-independent. Every Java source code is compiled to Java bytecode, which can be executed on any platform that has its own JVM without compilation.
Modifiers – certain reserved words that specify the properties of the data, methods, and classes and how they can be used.
Statements – a statement represents an action or a sequence of actions. Every statement in Java ends with a semicolon (;) ++i
Blocks – are used to group the components of the program, for example class blocks and method block
Classes – the class is the essential Java construct. Every Java program has at least one class. Programs are inside a class definition enclosed in blocks
The main method provide the control of program flow. The JVM executes the Java application by invoking the main method.
Rules to name a Java source file: * If a class has no modifier define for the keyword class, that class is thus default. The file name can be any. * If a class has public modifier, the file name must be the same as that class * If a class has main method, that class should be public
Therefore there must not be more than one public class in one file.
Identifiers – special symbols to name programming entities such as variables, constants, methods, classes, and packages. An identifier is a sequence of characters that begins with a letter, _, or $, then following with letters, digits, _, $. It must not be a reserved word, must not be true, false, or null, and can be of any length.

Command-line arguments…. java ClassName Hello World Hello ↲ World java ClassName “Hello World” Hello World java ClassName “First Num” 53 First Num ↲ 53
Expression – represents a computation involving values, variables, and operations that together evaluate a value system.out.println(++i);
Constants – represent permanent

You May Also Find These Documents Helpful

  • Powerful Essays

    System.out.println("i = " + i + " f = " + f + " d = " + d);…

    • 2338 Words
    • 10 Pages
    Powerful Essays
  • Satisfactory Essays

    A difference is that they are not all case sensitive. Another difference is not all of them use the same reserved words for functions and methods. A third difference is Java and Python are platform independent while visual basic is not.…

    • 218 Words
    • 1 Page
    Satisfactory Essays
  • Good Essays

    A1: Applet is a type of Java program that runs on web browser. It can be a fully functional Java application because it has full Java API…

    • 559 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    mat540 quiz 1 review

    • 668 Words
    • 6 Pages

    ( A variable is a symbol used to represent an item that can take on any value,)…

    • 668 Words
    • 6 Pages
    Satisfactory Essays
  • Good Essays

    pt1420 exam review

    • 738 Words
    • 3 Pages

    What is a set of statements that execute in the order that they appear? Sequence Structure…

    • 738 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    Boston Beer

    • 479 Words
    • 2 Pages

    1a. There are several reasons BBC should focus on the light beer market. It is true that their sales were decreasing from year to year but I think there is nothing wrong with the product itself. The problem is on the marketing and management system. It was proved from the result of the consumer taste survey. Most of people said that lightship beer had better taste, better color and smell compare to Bud light, Coors Light, and Amstel Light and the result stated that lightship beer was in the first place. We got almost the same result from the blind test that is held in several countries including USA and Canada. Another important reason is the demand for the light beer is relative high from the consumers. People said that the advantage of drinking light beer because it contains lower calorie. Based on the field study, light beers accounted for five of the top ten best-selling beers in supermarkets. So, it is very pity if BBC stops producing light beer.…

    • 479 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    1. In the statement, x =3;, the ' =' operator is one of Java's extended assignment operators.…

    • 719 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    This course introduces students to object-oriented programming. It covers object-oriented tools for system analysis, design and development. The course teaches the significance of object-oriented programming, the keywords and constructs of the Java programming language, and the steps required to create simple Java technology programs.…

    • 414 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    I Like to 1321

    • 459 Words
    • 2 Pages

    statement. Also included is a for loop (repetition statement). Pay close attention to these as you…

    • 459 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Deitel, H.M., & Deitel, P.J. (2002). Java: How to program (6th ed.). Upper Saddle River, NJ: Pearson…

    • 253 Words
    • 2 Pages
    Satisfactory Essays
  • Powerful Essays

    Thought there are numerous computer programming languages in the world today, we will focus on the three basic fundamental types of computer programming languages.…

    • 1318 Words
    • 6 Pages
    Powerful Essays
  • Satisfactory Essays

    unit 4

    • 691 Words
    • 4 Pages

    A variable is declared inside a local module in which it is the only statement within a module…

    • 691 Words
    • 4 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Homework CH 1 Java

    • 723 Words
    • 5 Pages

    2. Languages that let you use a vocabulary of descriptive terms, such as read, write, or…

    • 723 Words
    • 5 Pages
    Satisfactory Essays
  • Good Essays

    Onetop Master

    • 439 Words
    • 2 Pages

    A public static method named computeSum() is located in classA. To call the method from within classB, use the statement ___________.…

    • 439 Words
    • 2 Pages
    Good Essays
  • Good Essays

    Deitel, H.M., & Deitel, P.J. (2002). Java: How to program (6th ed.). Upper Saddle River, NJ: Pearson Education…

    • 356 Words
    • 2 Pages
    Good Essays

Related Topics