Presentation is loading. Please wait.

Presentation is loading. Please wait.

Basics Programming Concepts. Basics A computer program is a set of instructions to tell a computer what to do Machine language = circuit level language.

Similar presentations


Presentation on theme: "Basics Programming Concepts. Basics A computer program is a set of instructions to tell a computer what to do Machine language = circuit level language."— Presentation transcript:

1 Basics Programming Concepts

2 Basics A computer program is a set of instructions to tell a computer what to do Machine language = circuit level language for the computer; converts to 0s and 1s High level programming language = “human” language used to write a program – Public; class; if; etc. Syntax – rules of the language – Ex – all programs in a “class”; system.out.printline

3 Basics - continued Programmers write programs using high level language – must get translated into machine language = compiling Syntax errors – misuse of the language – Compiler error Debugging – fixing syntax errors

4 Java Just one type of language in existence Write the source code ….. Save as a.java file …. Compile the source code…. If there are no syntax errors it will compile and save as a.class file.java Textpad software Source Code.class Compile Code Run Program

5 When the program runs, it is the.class file that gets executed.

6 Basic Java Application public class First { public static void main (String[] args) { System.out.println(“First Java app”); } Every application initially follows this format This will change as you write programs

7 Comments public class First { public static void main (String[] args) { //this next line displays text System.out.println(“First Java app”); } //Comments needed to describe what your code is supposed to do!!

8 Indenting Code public class First { //notice how the line is indented public static void main (String[] args) { //this next line displays text System.out.println(“First Java app”); }


Download ppt "Basics Programming Concepts. Basics A computer program is a set of instructions to tell a computer what to do Machine language = circuit level language."

Similar presentations


Ads by Google