Introduction to Java - softuni:介绍java softuni.bg.pptx
Table of Contents 1. Your First Java Program 2. The Java Language 3. The Java Platform and JVM 4. JDK – Java SE Development Kit ? Using javac and java from mand line 5. Java IDEs 6. Java Documentation 1 Your First Java Program Writing and Running Java Code in IntelliJ A sample Java program: public class HelloJava { public static void main(String[] args) { ("Hello Java!"); } } First Look at Java 3 public class HelloJava { public static void main(String[] args) { ("Hello Java!"); } } Java Code – How It Works? 4 Define a class " HelloJava " Define the main( …) method – the program entry point Print a text on the console by calling the method " println " of the class " System " 5 5 Formatting Java Code public class HelloJava { public static void main(String[] args) { ("Hello Java!"); } } The block after the { symbol is indented right by a TAB . The } symbol stays under the block holding the {. Class names in Java are in PascalCase . The { symbol stays at the same line. Method names in Java are in camelCase . 6 File Names Should Match Class Names! ? In Java all public classes should stay in a file with the same name ? For example, the class HelloJava should be in the file public class HelloJava { public static void main(String args[]) { (" Hello Java!"); } } Your First Java Program Live Demo 8 ? Java is very popular programming language ? A syntax to puter programs ? Object-oriented, statically typed, similar to C# ? Easy to learn, easy to read, easy to understand ? Java is a development platform ? Java SE, Java EE, JavaFX , Java ME, Android ? piled Java code in a virtual machine (JVM) ? Runs on millions of devices, in any OS What is "Java"? 9 The Java Programming Language 10 ? Java programming language ? High-level object-oriented general purpose language ? Stat
Introduction to Java - softuni:介绍java softuni.bg 来自淘豆网m.daumloan.com转载请标明出处.