Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Modern Programming Languages-I Introduction to Java Java was developed by a team led by James Gosling at Sun Microsystems. Originally called Oak, it was designed in 1991 for use in embedded consumer electronic appliances. In 1995, renamed Java, it was redesigned for developing Internet applications. Java is a simple, object-oriented, distributed, interpreted, robust, secure, architecture-neutral, portable, high- performance, multi-threaded, and dynamic language - Java API The application program interface (API) contains predefined classes and interfaces for developing Java programs. The Java language specification is stable, but the API is still expanding. At the Sun Java website (java.sun.com), you can view and download the latest version of the Java API. Java -- Language + Libraries Java has two parts... 1. The core language -- variables, arrays, objects The Java Virtual Machine (JVM) runs the core language The core language is simple enough to run on small devices -- phones, smart cards, PDAs. 2. The libraries Java includes a large collection of standard library classes to provide "off the shelf" code. (Useful built-in classes that comes with the language to perform basic tasks) Example of these classes is String, ArrayList, HashMap, StringTokenizer (to break string into substrings), Date ... Java programmers are more productive in part because they have access to a large set of standard, well documented library classes. Java Application Types 1. Java Application programming Java application program is the one which run on your computer under the O.S of your computer. 2. Java Applet Programming Java applet is an application designed to be transmitted over the Internet and executed java compatible web browser. Week 1 Page 1 of 3 Modern Programming Languages-I - Java Program Structure Questions 1. What are the input and output of a Java compiler? 2. Explain the Java keywords. List some Java keywords you learned ? 3. Is Java case-sensitive? What is the case for Java keywords? 4. What is the Java source filename extension, and what is the Java bytecode filename extension? 5. What is a comment? What is the syntax for a comment in Java? Is the comment ignored by the compiler? 6. What is the statement to display a string on the console? Week 1 Page 2 of 3 Modern Programming Languages-I Identify and fix the errors in the following code: public class Welcome { public void Main(String[] args) { System.out.println('Welcome to Java!); } } 7. What is the command to compile a Java program? What is the command to run a Java application? Week 1 Page 3 of 3