1 1 1 introduction to java. 2 history of java java – originally for intelligent...
TRANSCRIPT
![Page 1: 1 1 1 Introduction to Java. 2 History of Java Java – Originally for intelligent consumer-electronic devices – Then used for creating Web pages with dynamic](https://reader035.vdocuments.us/reader035/viewer/2022062421/56649e025503460f94aed827/html5/thumbnails/1.jpg)
1
11
Introduction to Java
![Page 2: 1 1 1 Introduction to Java. 2 History of Java Java – Originally for intelligent consumer-electronic devices – Then used for creating Web pages with dynamic](https://reader035.vdocuments.us/reader035/viewer/2022062421/56649e025503460f94aed827/html5/thumbnails/2.jpg)
2
History of Java
• Java– Originally for intelligent consumer-electronic
devices
– Then used for creating Web pages with dynamic content
– Now also used to:• Develop large-scale enterprise applications
• Enhance WWW server functionality
• Provide applications for consumer devices (cell phones, etc.)
![Page 3: 1 1 1 Introduction to Java. 2 History of Java Java – Originally for intelligent consumer-electronic devices – Then used for creating Web pages with dynamic](https://reader035.vdocuments.us/reader035/viewer/2022062421/56649e025503460f94aed827/html5/thumbnails/3.jpg)
3
Java Class Libraries
•Classes– Include methods that perform tasks• Return information after task completion
– Used to build Java programs
• Java provides class libraries– Known as Java APIs (Application Programming
Interfaces)
![Page 4: 1 1 1 Introduction to Java. 2 History of Java Java – Originally for intelligent consumer-electronic devices – Then used for creating Web pages with dynamic](https://reader035.vdocuments.us/reader035/viewer/2022062421/56649e025503460f94aed827/html5/thumbnails/4.jpg)
4
FORTRAN, COBOL, Pascal and Ada
• FORTRAN– FORmula TRANslator
•COBOL– COmmon Business Oriented Language
• Pascal– Structured programming
•Ada– Multitasking
![Page 5: 1 1 1 Introduction to Java. 2 History of Java Java – Originally for intelligent consumer-electronic devices – Then used for creating Web pages with dynamic](https://reader035.vdocuments.us/reader035/viewer/2022062421/56649e025503460f94aed827/html5/thumbnails/5.jpg)
5
BASIC, Visual Basic, Visual C++, C# and .NET
• BASIC– Beginner’s All-Purpose Symbolic Instruction Code
• .NET– .NET platform
•Visual Basic .NET– Based on BASIC
•Visual C++– Based on C++
•C#– Based on C++ and Java
![Page 6: 1 1 1 Introduction to Java. 2 History of Java Java – Originally for intelligent consumer-electronic devices – Then used for creating Web pages with dynamic](https://reader035.vdocuments.us/reader035/viewer/2022062421/56649e025503460f94aed827/html5/thumbnails/6.jpg)
6
Typical Java Development Environment
• Java programs normally undergo five phases– Edit
• Programmer writes program (and stores program on disk)
– Compile• Compiler creates bytecodes from program
– Load• Class loader stores bytecodes in memory
– Verify• Bytecode Verifier confirms bytecodes do not violate security
restrictions
– Execute• JVM translates bytecodes into machine language
![Page 7: 1 1 1 Introduction to Java. 2 History of Java Java – Originally for intelligent consumer-electronic devices – Then used for creating Web pages with dynamic](https://reader035.vdocuments.us/reader035/viewer/2022062421/56649e025503460f94aed827/html5/thumbnails/7.jpg)
7
Fig. 1.1 Typical Java development environment.
![Page 8: 1 1 1 Introduction to Java. 2 History of Java Java – Originally for intelligent consumer-electronic devices – Then used for creating Web pages with dynamic](https://reader035.vdocuments.us/reader035/viewer/2022062421/56649e025503460f94aed827/html5/thumbnails/8.jpg)
8
Creating a Program with JCreator
•Click on the JCreator Icon
• IDE windowappears
![Page 9: 1 1 1 Introduction to Java. 2 History of Java Java – Originally for intelligent consumer-electronic devices – Then used for creating Web pages with dynamic](https://reader035.vdocuments.us/reader035/viewer/2022062421/56649e025503460f94aed827/html5/thumbnails/9.jpg)
9
Creating a Program with JCreator
•Click on File, New, then Project
• Project Wizard appears– Choose Java Application template
![Page 10: 1 1 1 Introduction to Java. 2 History of Java Java – Originally for intelligent consumer-electronic devices – Then used for creating Web pages with dynamic](https://reader035.vdocuments.us/reader035/viewer/2022062421/56649e025503460f94aed827/html5/thumbnails/10.jpg)
10
Creating a Program with JCreator
•Give the project a name
• Then click Next
![Page 11: 1 1 1 Introduction to Java. 2 History of Java Java – Originally for intelligent consumer-electronic devices – Then used for creating Web pages with dynamic](https://reader035.vdocuments.us/reader035/viewer/2022062421/56649e025503460f94aed827/html5/thumbnails/11.jpg)
11
Creating a Program with JCreator
• You will want the JDK version 1.5
• This tab is where you can specify hsa library
At this point you can click on FinishAt this point you can click on Finish
![Page 12: 1 1 1 Introduction to Java. 2 History of Java Java – Originally for intelligent consumer-electronic devices – Then used for creating Web pages with dynamic](https://reader035.vdocuments.us/reader035/viewer/2022062421/56649e025503460f94aed827/html5/thumbnails/12.jpg)
12
Creating a Program with JCreator
•Now we create our class (the program) with File, New, and Class
The Class Wizard appears. Specify a name for the class
and make sure Public is chosen
For now, you can proceed with Finish
![Page 13: 1 1 1 Introduction to Java. 2 History of Java Java – Originally for intelligent consumer-electronic devices – Then used for creating Web pages with dynamic](https://reader035.vdocuments.us/reader035/viewer/2022062421/56649e025503460f94aed827/html5/thumbnails/13.jpg)
13
Creating a Program with JCreator
• The wizard creates a template.
•Now complete the program with the required commands.
![Page 14: 1 1 1 Introduction to Java. 2 History of Java Java – Originally for intelligent consumer-electronic devices – Then used for creating Web pages with dynamic](https://reader035.vdocuments.us/reader035/viewer/2022062421/56649e025503460f94aed827/html5/thumbnails/14.jpg)
14
Creating a Program with JCreator
•Run the compiler with Build, and CompileFile
Build Output shows in bottom pane. This is where compiler error messages will be displayed.
Build Output shows in bottom pane. This is where compiler error messages will be displayed.
![Page 15: 1 1 1 Introduction to Java. 2 History of Java Java – Originally for intelligent consumer-electronic devices – Then used for creating Web pages with dynamic](https://reader035.vdocuments.us/reader035/viewer/2022062421/56649e025503460f94aed827/html5/thumbnails/15.jpg)
15
Creating a Program with JCreator
• To run the compiled program click on Build, and ExecuteFile
• Program runs in separate window
Without Creating a ProjectWithout Creating a Project
![Page 16: 1 1 1 Introduction to Java. 2 History of Java Java – Originally for intelligent consumer-electronic devices – Then used for creating Web pages with dynamic](https://reader035.vdocuments.us/reader035/viewer/2022062421/56649e025503460f94aed827/html5/thumbnails/16.jpg)
16
View Flash Presentations
•Creating a workspace, project, and application
•Writing, compiling, running an application
![Page 17: 1 1 1 Introduction to Java. 2 History of Java Java – Originally for intelligent consumer-electronic devices – Then used for creating Web pages with dynamic](https://reader035.vdocuments.us/reader035/viewer/2022062421/56649e025503460f94aed827/html5/thumbnails/17.jpg)
17
11
Introduction to Java