Java

In: Computers and Technology

Submitted By Viinncceennt
Words 662
Pages 3
This tutorial explains the installation and usage of the Java programming language. It also contains examples for standard programming tasks.
1. Introduction to Java
1.1. History
Java is a programming language created by James Gosling from Sun Microsystems in 1991. The first publicly available version of Java (Java 1.0) was released in 1995.

Over time new enhanced versions of Java have been released. The current version of Java is Java 1.7 which is also known as Java 7.

From the Java programming language the Java platform evolved. The Java platform allows that the program code is written in other languages than the Java programming language and still runs on the Java virtual machine.

1.2. Java Virtual machine
The Java virtual machine (JVM) is a software implementation of a computer that executes programs like a real machine.

The Java virtual machine is written specifically for a specific operating system, e.g. for Linux a special implementation is required as well as for Windows.

Java programs are compiled by the Java compiler into so-called bytecode. The Java virtual machine interprets this bytecode and executes the Java program.

1.3. Java Runtime Environment vs. Java Development Kit
Java comes in two flavors, the Java Runtime Environment (JRE) and the Java Development Kit (JDK).

The Java runtime environment (JRE) consists of the JVM and the Java class libraries and contains the necessary functionality to start Java programs.

The JDK contains in addition the development tools necessary to create Java programs. The JDK consists therefore of a Java compiler, the Java virtual machine, and the Java class libraries.

1.4. Characteristics of Java
The target of Java is to write a program once and then run this program on multiple operating systems.

Java has the following properties:

Platform independent: Java programs use the Java…...

Similar Documents

Java

...JAVA: Cost cutting may not be the long-term EPS driver Sun Microsystems, Inc. (JAVA) continues with its resurrection of earnings by treading into positive turf and achieving an operating profit in FY07, the first time since FY01. JAVA recorded three consecutive quarters of positive EPS in FY07 and is now targeting an operating margin of at least 10% in FY09. However, underlying this growth is a scenario that bristles with complexities, and not everything is as rosy as it seems. For instance, growth appears anemic—sales are expected to rise in low single digits this quarter. And it’s not yet clear whether JAVA is making new money through open source or simply finding new ways to save money. All eyes are now on Jonathan I. Schwartz, who took over as CEO of JAVA from Scott McNealy in Apr-06; justifiably so, because Schwartz is not merely seeking to turn around operations by paring payrolls, reducing headcount, and restructuring. He has set out to redefine the way a company can do business in the new Web age. If Schwartz can reestablish Java as a credible trendsetter, it would make for one of the Valley’s more spectacular comebacks. We analyze whether Schwartz’s pronouncements of growth objectives match JAVA’s performance across sectors and whether the targets can be achieved by cost containment rather than revenue growth. We set out to gauge whether this turnaround is a temporary blip or a true resurgence. Management change and new objectives When Schwartz took...

Words: 1427 - Pages: 6

Java Ii

.../* * * Java II PRG 421 * June 20, 2011 * Week 4 Assignment * */ package javaapplication46; //import utilities import java.text.NumberFormat; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.*; import java.awt.*; public class JavaApplication46 extends JFrame implements ActionListener { //Arrays declared int loanTermsYears[] = {7, 15, 30}; double annualRatesPercentage[] = {5.35, 5.5, 5.75}; public class JTabbedPane { JPanel mainSettings = new JPanel(); JTabbedPane tabs = new JTabbedPane(); } //Labels declared JLabel AmountLabel = new JLabel("Loan Amount:$ "); JLabel PaymentLabel = new JLabel("Monthly Payment: "); JLabel InterestLabel = new JLabel("Interest Rate %: "); JLabel TermLabel = new JLabel("Loan Term"); //Text Fields declared JTextField mortgageAmount = new JTextField(7); JTextField Payment = new JTextField(7); JTextField InterestRate = new JTextField(3); JTextField Term = new JTextField(3); //Buttons declared JButton Loan7yrs = new JButton("7 years @ 5.35%"); JButton Loan15yrs = new JButton("15 years @ 5.50%"); JButton Loan30yrs = new JButton("30 years @ 5.75%"); JButton ExitButton = new JButton("Exit"); JButton ClearButton = new JButton("Reset"); JButton CalculateButton = new JButton("Calculate"); // Text Area and ScrollPane declared JTextArea LoanPayments...

Words: 590 - Pages: 3

Java

...November 30, 2011 Java Security Jessica Shaw: 628 Robert Grimsley: 596 Java is a programming language developed by Sun Microsystems in 1995, which is now called Oracle. The language itself is derived from the languages C and C++. Java is a simple language compared to C and C++; however they are all object-oriented languages. The language was designed to help minimize the amount of space and take up as little of your computer’s hardware resources as possible. The language was designed upon five key goals, and they are as followed: * It should be "simple, object-oriented and familiar" * It should be "robust and secure" * It should be "architecture-neutral and portable" * It should execute with "high performance" * It should be "interpreted, threaded, and dynamic" Java is used for a multitude of things. Java allows one to play virtual video games, view and design 3D photos, and many other interactive topics on the internet. Java is the main programming language for mobile devices as well as smart phones such as Android by google. Java is a very secure and reliable language that is used by over 800 billion people. Without the Java languages there are millions of applets and interactive applications on websites that wouldn’t preform properly without it. Java is compiled by byte code that allows for the program to be run through the Java Virtual Machine, or JVM. The compiling method allows...

Words: 2557 - Pages: 11

Java

...Once again, Robert Sedgewick provides a current and comprehensive introduction to important algorithms. The focus this time is on graph algorithms, which are increasingly critical for a wide range of applications, such as network connectivity, circuit design, scheduling, transaction processing, and resource allocation. In this book, Sedgewick offers the same successful blend of theory and practice that has made his work popular with programmers for many years. Michael Schidlowsky and Sedgewick have developed concise new Java implementations that both express the methods in a natural and direct manner and also can be used in real applications. Algorithms in Java, Third Edition, Part 5: Graph Algorithms is the second book in Sedgewick's thoroughly revised and rewritten series. The first book, Parts 1-4, addresses fundamental algorithms, data structures, sorting, and searching. A forthcoming third book will focus on strings, geometry, and a range of advanced algorithms. Each book's expanded coverage features new algorithms and implementations, enhanced descriptions and diagrams, and a wealth of new exercises for polishing skills. The natural match between Java classes and abstract data type (ADT) implementations makes the code more broadly useful and relevant for the modern object-oriented programming environment. The Web site for this book (www.cs.princeton.edu/~rs/) provides additional source code for programmers along with a variety of academic support materials for......

Words: 281 - Pages: 2

Java

...This tutorial explains the installation and usage of the Java programming language. It also contains examples for standard programming tasks. 1. Introduction to Java 1.1. History Java is a programming language created by James Gosling from Sun Microsystems in 1991. The first publicly available version of Java (Java 1.0) was released in 1995. Over time new enhanced versions of Java have been released. The current version of Java is Java 1.7 which is also known as Java 7. From the Java programming language the Java platform evolved. The Java platform allows that the program code is written in other languages than the Java programming language and still runs on the Java virtual machine. 1.2. Java Virtual machine The Java virtual machine (JVM) is a software implementation of a computer that executes programs like a real machine. The Java virtual machine is written specifically for a specific operating system, e.g. for Linux a special implementation is required as well as for Windows. Java programs are compiled by the Java compiler into so-called bytecode. The Java virtual machine interprets this bytecode and executes the Java program. 1.3. Java Runtime Environment vs. Java Development Kit Java comes in two flavors, the Java Runtime Environment (JRE) and the Java Development Kit (JDK). The Java runtime environment (JRE) consists of the JVM and the Java class libraries and contains the necessary functionality to start Java programs. The JDK contains in...

Words: 662 - Pages: 3

Java

... ........................................................................................................................................2 Table: General Assumptions ....................................................................................................................3 Table: Profit and Loss ...............................................................................................................................4 Table: Cash Flow .......................................................................................................................................5 Table: Balance Sheet ................................................................................................................................6 Page 2 Java Culture 1.0 Executive Summary Java Culture coffee bar is determined to bec ome a daily nec essity for loc al coffee addicts, a plac e to dream of as you try to escape the daily stresses of life and just a comfortable plac e to meet your friends or to read a book, all in one. With the growing demand for high-quality gourmet coffee and great service, Java Culture will capitalize on its proximity to the University of Oregon campus to build a core group of repeat customers. Java Culture will offer its customers the best prepared coffee in the area that will be complimented with pastries, as well as free books that its patrons can read to enjoy their visit. The company will operate a 2,300 square foot coffee bar within a walking......

Words: 7859 - Pages: 32

Java

...© Prentice Hall and Sun Microsystems. Personal use only; do not redistribute. JSP Scripting Chapter Elements Topics in This Chapter • The purpose of JSP • How JSP pages are invoked • Using JSP expressions to insert dynamic results directly into the output page • Using JSP scriptlets to insert Java code into the method that handles requests for the page • Using JSP declarations to add methods and field declarations to the servlet that corresponds to the JSP page • Predefined variables that can be used within expressions and scriptlets Online version of this first edition of Core Servlets and JavaServer Pages is free for personal use. For more information, please see: • • • Second edition of the book: http://www.coreservlets.com. Sequel: http://www.moreservlets.com. Servlet and JSP training courses from the author: http://courses.coreservlets.com. © Prentice Hall and Sun Microsystems. Personal use only; do not redistribute. Chapter avaServer Pages (JSP) technology enables you to mix regular, static HTML with dynamically generated content from servlets. You simply write the regular HTML in the normal manner, using familiar Web-page-building tools. You then enclose the code for the dynamic parts in special tags, most of which start with . For example, here is a section of a JSP page that results in “Thanks for ordering Core Web Programming” for a URL of http://host/OrderConfirmation.jsp?title=Core+Web+Programming: Thanks for ordering J Separating...

Words: 1383 - Pages: 6

Java

...day we're continuing our Java security research series by analyzing other plug-ins, browser extensions and rich internet applications that are commonly exploited. Our previous research indicated that the current state of Java affairs isn't pretty. At that time, ninety-three percent of enterprises were vulnerable to known Java exploits. Nearly 50 percent of enterprise traffic used a Java version that was more than two years out of date. Through Websense ThreatSeeker Intelligence Cloud analysis we now discover: Only 19 percent of enterprise Windows-based computers ran the latest version of Java (7u25) between August 1-29, 2013. More than 40 percent of enterprise Java requests are from browsers still using outdated Java 6. As a result, more than 80 percent of Java requests are susceptible to two popular new Java exploits: CVE-2013-2473 and CVE-2013-2463. 83.86 percent of enterprise browsers have Java enabled. Nearly 40 percent of users are not running the most up-to-date versions of Flash. In fact, nearly 25 percent of Flash installations are more than six months old, close to 20 percent are outdated by a year and nearly 11 percent are two years old. Our in-depth analysis ran for one month, across multiple verticals and industries. We surveyed millions of real-world web requests for Java usage through our global Websense ThreatSeeker Intelligence Cloud. New Java Exploits and the Neutrino Exploit Kit New Java exploits...

Words: 1745 - Pages: 7

Java

... from date | 1.2.30 | Stats5.java | average, min, max of 5 random numbers | 1.2.34 | ThreeSort.java | sort three integers | 1.2.35 | Dragon.java | dragon curve of order 5 | 1.3.8 | FivePerLine.java | print integers five per line | 1.3.11 | FunctionGrowth.java | table of functions | 1.3.12 | DigitReverser.java | reverse digits | 1.3.13 | Fibonacci.java | Fibonacci numbers | 1.3.15 | SeriesSum.java | convergent sum | 1.3.20 | BinaryToString.java | binary number to string conversion | 1.3.31 | Ramanujan.java | taxicab numbers | 1.3.32 | ISBN.java | ISBN checksum | 1.3.38 | Sin.java | sine function via Taylor series | 1.3.41 | MonteHall.java | Monte Hall problem | 1.4.2 | HugeArray.java | creating a huge array | 1.4.10 | Deal.java | deal poker hands | 1.4.13 | Transpose.java | tranpose a square matrix | 1.4.25 | InversePermutation.java | compute inverse permutation | 1.4.26 | Hadamard.java | compute Hadamard matrix | 1.4.30 | Minesweeper.java | create Minesweeper board | 1.4.33 | RandomWalkers.java | N random walkers | 1.4.35 | Birthdays.java | birthday problem | 1.4.37 | BinomialCoefficients.java | binomial coefficients | 1.5.1 | MaxMin.java | max and min from standard input | 1.5.3 | Stats.java | mean and stddev from standard input | 1.5.5 | LongestRun.java | longest consecutive run from stdin | 1.5.11 | WordCount.java | word count from standard input | 1.5.15 | Closest.java | closest point | 1.5.18 | CheckerBoard.java...

Words: 1619 - Pages: 7

Java

...Mohammad Doush Mr. Matthew Robert English 103 13 April 2013 Java the Programming Language Computer is very important in our live, we use computer in everywhere on our live. The doctor uses the computer to see file or pictures of his patients. Also, each engineer uses it in many ways of his work. The teacher in the classroom, employees in the offices and student in their study all of them use computer in them daily live. They are not using the mouse, the keyboard or the scream. They are using the applications by them these applications in the computer are like the soul in the body. The only way to build these applications is programming. To program we need to know one of the programming languages which are very similar each other. If you are professional in one of these languages you can be professional in the other language in a short period of time. It is acceptable if you have the same application written with Java once and with C++ or C sharp at the same time. So for this reason you cannot say that a programming language is better than others. There are three types of programming languages procedural, functional and object-oriented languages. The most uses of these languages are object-oriented and one of these languages is Java you can write any application you need using it. Also you can translate any application to its word. The message of the High-Level programming languages such as Algol and Pascal in first programming revolution...

Words: 2352 - Pages: 10

Java

...Eclipse and Java for Total Beginners Tutorial Companion Document Eclipse And Java For Total Beginners Companion Tutorial Document By Mark Dexter Table of Contents Introduction........................................................................................................... .............................2 . Tutorial Target Audience.....................................................................................................................2 Tutorial Objectives..............................................................................................................................2 Why learn Java with Eclipse?.............................................................................................................3 Topics Covered...................................................................................................................................3 Tutorial Approach............................................................................................................... ................3 . Getting The Most From This Tutorial..................................................................................................3 Sample Java Application – Personal Lending Library........................................................................4 Downloading and Installing Eclipse ...................................................................................................4 Playing the Lessons...

Words: 7556 - Pages: 31

Java

...Object Oriented System Software Engineering with JAVA Coursework The coursework is 50% of the assessment for the module. Learning Outcomes Have a through knowledge of one object orientated method down to detailed design. Have the experience to implement an object oriented design in an object oriented language. Assessment Criteria IMPORTANT: This is an individual assignment, all submitted components must be your own work or appropriately accredited. The assignment is scenario based (see attached scenario). You are encouraged to make any assumptions you deem necessary when analyzing he requirements outlined in the scenario, however, these must be clearly stated in the report. Your report should address the following three tasks: Task 1: Design the system required using the UML method. Task 2: Implement the system (or part of , see Grading below) using JAVA. Task 3: Objectively evaluate your solution including an appraisal of the suitability of UML and JAVA as tools for implementing object oriented solutions. Deliverable • You should submit a hard-copy and an electronic copy of the assignment • The submission should not be longer that 40 pages including diagrams but excluding the Appendices. • Instructions on how to install and run the program should be provided in an Appendix. Grading Distinction-Grade A (70%) To achieve a Distinction, you must successfully meet all of the criteria for a Merit and Task 1 • The design is comprehensive...

Words: 1035 - Pages: 5

Java

...Submission Instructions: 1- Create a NetBeans project for each problem and name your project according to the problem in question. E.g, for problem 7, the project name must be Project7. 3- Compress (zip) your folders and upload them to Omnivox. 7. Write a program that prompts the user to enter five test scores and then prints the average test score. 8. Write a program that prompts the user to input five decimal numbers. The program should then add the five decimal numbers, convert the sum to the nearest integer, and print the result. 10. Write a program that prompts the capacity, in gallons, of an automobile fuel tank and the miles per gallons the automobile can be driven. The program outputs the number of miles the automobile can be driven without refueling. 13. To make a profit, a local store marks up the prices of its items by a certain percentage. Write a Java program that reads the original price of the item sold, the percentage of the marked-up price, and the sales tax rate. The program then outputs the original price of the item, the marked-up percentage of the item, the store’s selling price of the item, the sales tax rate, the sales tax, and the final price of the item. (The final price of the item is the selling price plus the sales tax.) 17. A permutation of three objects, a, b, and c, is any arrangement of these objects in a row. For example, some of the permutations of these objects are abc, bca, and cab. The number of permutations of three objects is......

Words: 334 - Pages: 2

Java

...A Comparison between Java and .Net Languages Introduction Java and .Net provide technologies that enable skilled developers to build quality enterprise applications. These technologies are rarely picked based on performance alone. There are many factors to consider when choosing Java or .Net. These considerations are often the deciding factor when choosing one or both of these platforms. Java Java is kenned as both a programming language and a development platform. It was first developed by Sun Microsystems in 1991 and subsequently relinquished in 1995. To help to make the language more accepted and accessible, Sun Microsystems developed it as an object oriented language with a syntax that is very similar to C++. (Java vs. .NET, 2007) Sun Microsystems decided to create this new platform out of a desire to be able to write programs only once that could be run on any system. (James) The Java 2 platform was launched in December 1998. This was a major amelioration of the platform, and included incipient graphics, user interface, and enterprise capabilities. This upgrade was over seven times as large as the initial Java 1.0 release and marked the maturity of the Java platform. (What is java?) Within the Java 2 platform there are 3 editions: • The Java 2 Standard Edition (J2SE) Provides the essential compiler, tools, runtimes, and APIs for writing, deploying, and running applets and applications. • The Java 2 Enterprise Edition (J2EE) Defines a standard for developing...

Words: 2279 - Pages: 10

Java

...Software Design Introduction to the Java Programming Language Material drawn from [JDK99,Sun96,Mitchell99,Mancoridis00] Software Design (Java Tutorial) © SERG Java Features • “Write Once, Run Anywhere.” • Portability is possible because of Java virtual machine technology: – Interpreted – JIT Compilers • Similar to C++, but “cleaner”: – No pointers, typedef, preprocessor, structs, unions, multiple inheritance, goto, operator overloading, automatic coercions, free. Software Design (Java Tutorial) © SERG Java Subset for this Course • We will focus on a subset of the language that will allow us to develop a distributed application using CORBA. • Input and output will be character (terminal) based. • For detailed treatment of Java visit: – http://java.sun.com/docs/books/tutorial/index.html Software Design (Java Tutorial) © SERG Java Virtual Machine • Java programs run on a Java Virtual Machine. • Features: – – – – – Security Portability Superior dynamic resource management Resource location transparency Automatic garbage collection Software Design (Java Tutorial) © SERG The Java Environment Java Source File (*.java) Java Compiler (javac) Java Bytecode File (*.class) Java Virtual Machine (java) Software Design (Java Tutorial) © SERG Program Organization Source Files (.java) Running Application Running Applet JAVA BYTECODE COMPILER Class Files (.class) JAVA VIRTUAL MACHINE WEB BROWSER Software Design (Java Tutorial) © SERG Program Organization Standards...

Words: 5230 - Pages: 21