Java Programming [R17a0507]

Total Page:16

File Type:pdf, Size:1020Kb

Java Programming [R17a0507] JAVA PROGRAMMING [R17A0507] LECTURE NOTES B.TECH II YEAR – II SEM (R17) (2018-19) DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING MALLA REDDY COLLEGE OF ENGINEERING & TECHNOLOGY (Autonomous Institution – UGC, Govt. of India) (Affiliated to JNTUH, Hyderabad, Approved by AICTE - Accredited by NBA & NAAC – ‘A’ Grade - ISO 9001:2015 Certified) Maisammaguda, Dhulapally (Post Via. Hakimpet), Secunderabad – 500100, Telangana State, INDIA. MALLA REDDY COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING (R17A0507)JAVA PROGRAMMING Objectives: This subject aims to introduce students to the Java programming language. Upon successful completion of this subject, students should be able to create Java programs that leverage the object-oriented features of the Java language, such as encapsulation, inheritance and polymorphism; use data types, arrays and other data collections; implement error-handling techniques using exception handling, create and event-driven GUI using Swing components. UNIT-I OOP Concepts:- Data abstraction, encapsulation, inheritance, Benefits of Inheritance, Polymorphism, classes and objects, Procedural and object oriented programming paradigms. Java Programming- History of Java, comments, Data types, Variables, Constants, Scope and Lifetime of variables, Operators, Operator Hierarchy, Expressions, Type conversion and casting, Enumerated types, Control flow- block scope, conditional statements, loops, break and continue statements, simple java stand alone programs, arrays, console input and output, formatting output, constructors, methods, parameter passing, static fields and methods, access control, this reference, overloading methods and constructors, recursion, garbage collection, building strings, exploring string class. UNIT – II Inheritance – Inheritance hierarchies super and sub classes, Member access rules, super keyword, preventing inheritance: final classes and methods, the Object class and its methods. Polymorphism – dynamic binding, method overriding, abstract classes and methods. Interfaces- Interfaces Vs Abstract classes, defining an interface, implement interfaces, accessing implementations through interface references, extending interface. Inner classes- Uses of inner classes, local inner classes, anonymous inner classes, static inner classes, examples. Packages- Defining, creating and accessing a package, Understanding CLASSPATH, importing packages. UNIT-III Exception handling- Dealing with errors, benefits of exception handling, the classification of exceptions- exception hierarchy, checked exceptions and unchecked exceptions, usage of try, catch, throw, throws and finally, rethrowing exceptions, exception specification, built in exceptions, creating own exception sub classes. Multithreading – Differences between multiple processes and multiple threads, thread states, creating threads, interrupting threads, thread priorities, synchronizing threads, inter-thread communication, producer consumer pattern,Exploring java.net and java.text. UNIT-IV Collection Framework in Java – Introduction to java collections, Overview of java collection framework, Generics, Commonly used collection classes- Array List, Vector, Hash table, Stack, Enumeration, Iterator, String Tokenizer, Random, Scanner, Calendar and Properties. Files- Streams- Byte streams, Character streams, Text input/output, Binary input/output, random access file operations, File management using File class. Connecting to Database – JDBC Type 1 to 4 drivers, Connecting to a database, querying a database and processing the results, updating data with JDBC. UNIT-V GUI Programming with Java- The AWT class hierarchy, Introduction to Swing, Swing Vs AWT, Hierarchy for Swing components, Containers – Jframe, JApplet, JDialog, JPanel, Overview of some Swing components – Jbutton, JLabel, JTextField, JTextArea, simple Swing applications, Layout management – Layout manager types – border, grid and flow Event Handling- Events, Event sources, Event classes, Event Listeners, Relationship between Event sources and Listeners, Delegation event model, Examples: Handling a button click, Handling Mouse events, Adapter classes. Applets – Inheritance hierarchy for applets, differences between applets and applications, Life cycle of an applet, Passing parameters to applets, applet security issues. TEXT BOOK: 1. Java Fundamentals – A Comprehensive Introduction, Herbert Schildt and Dale Skrien, TMH. REFERENCE BOOKS: 1. Java for Programmers, P.J.Deitel and H.M.Deitel, PEA (or) Java: How to Program , P.J.Deitel and H.M.Deitel, PHI 2. Object Oriented Programming through Java, P. Radha Krishna, Universities Press. 3. Thinking in Java, Bruce Eckel, PE 4. Programming in Java, S. Malhotra and S. Choudhary, Oxford Universities Press. Course Outcomes: An understanding of the principles and practice of object oriented analysis and design in the construction of robust, maintainable programs which satisfy their requirements; A competence to design, write, compile, test and execute straightforward programs using a high level language; An appreciation of the principles of object oriented programming; An awareness of the need for a professional approach to design and the importance of good documentation to the finished programs. Be able to implement, compile, test and run Java programs comprising more than one class, to address a particular software problem. Demonstrate the ability to use simple data structures like arrays in a Java program. Be able to make use of members of classes found in the Java API (such as the Math class). MALLA REDDY COLLEGE OF ENGINEERING & TECHNOLOGY DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING INDEX S. No Unit Topic Page no 1 OOP Concepts:- Data abstraction, encapsulation inheritance 1 I 2 Benefits of Inheritance 2 I 3 I Polymorphism, classes and objects 2 4 I Procedural and object oriented programming paradigms 3 5 I Java Programming- History of Java 4 6 I Comments, Data types, Variables, Constants 5-9 7 I Scope and Lifetime of variables 10 8 I Operators, Operator Hierarchy, Expressions 11-12 9 I Type conversion and casting, Enumerated types 12-13 Control flow- block scope, conditional statements, loops, break 10 I 13-14 and continue statements 11 I Simple java stand alone programs, arrays 14-18 12 I Console input and output, formatting output 18-19 13 I Constructors, methods, parameter passing 19-20 14 I Static fields and methods, access control, this reference, 21-30 Overloading methods and constructors, recursion, garbage 15 I 30-34 collection, Building strings, exploring string class. 16 I 34-36 S. No Unit Topic Page no Inheritance – Inheritance hierarchies super and sub classes, 17 II 37-40 Member access rules super keyword, preventing inheritance: final classes and 18 II 40-41 methods, the Object class and its methods. 19 II Polymorphism – dynamic binding, method overriding, 41-42 20 II abstract classes and methods. 43 Interfaces- Interfaces Vs Abstract classes, defining an 21 II 43-44 interface, implement interfaces Accessing implementations through interface references, 22 II 45 extending interface. 23 II Inner classes- Uses of inner classes, local inner classes 45-46 24 II Anonymous inner classes, static inner classes, examples. 46 25 II Packages- Defining, creating and accessing a package, 46-47 26 II Understanding CLASSPATH, importing packages. 47 Exception handling- Dealing with errors, benefits of exception 27 III 48 handling The classification of exceptions- exception hierarchy, checked 28 III 48-50 exceptions and unchecked exceptions 29 III Usage of try, catch, throw, throws and finally, 50-54 30 III Rethrowing exceptions, exception specification, 54 31 III Built in exceptions, creating own exception sub classes. 54 Multithreading – Differences between multiple processes and 32 III 55-56 multiple threads, thread states Creating threads, interrupting threads, thread priorities, 33 III 56-59 synchronizing threads 34 III Inter-thread communication, producer consumer pattern 59 35 III Exploring java.net and java.text. 60 S. No Unit Topic Page no Collection Framework in Java – Introduction to java 36 IV 62 collections, Overview of java collection framework, Generics Commonly used collection classes- Array List, Vector, Hash 37 IV 63-71 table, Stack, Enumeration, Iterator 38 IV String Tokenizer, Random, Scanner, Calendar and Properties. 71-76 Files- Streams- Byte streams, Character streams, Text 39 IV 77-82 input/output, Binary input/output Random access file operations, File management using File 40 IV 83-84 class. Connecting to Database – JDBC Type 1 to 4 drivers, 41 IV 85-88 Connecting to a a database, Querying a database and processing the results, updating data 42 IV with JDBC. 89-94 GUI Programming with Java- The AWT class hierarchy, 43 V Introduction to Swing, Swing Vs AWT, Hierarchy for Swing 95-100 components 44 V Containers – Jframe, JApplet, JDialog, JPanel 100-104 Overview of some Swing components – Jbutton, JLabel, 45 V 104-108 JTextField, JTextArea, simple Swing applications, Layout management – Layout manager types – border, grid and 46 V 109-111 flow Event Handling- Events, Event sources, Event classes, Event 47 V 111-112 Listeners, Relationship between Event sources and Listeners, Delegation 48 V 112-113 event model, Handling a button click, Handling Mouse events, Adapter 49 V 114-116 classes. 50 V Applets – Inheritance hierarchy for applets 118-119 Differences between applets and applications, Life cycle of an 51 V 120 applet, 52 V Passing parameters to applets, applet security issues. 121 MALLA
Recommended publications
  • Java Programming 18Mca32c
    JAVA PROGRAMMING 18MCA32C Unit – I INTRODUCTION FACULTY Dr. K. ARTHI MCA, M.Phil., Ph.D., Assistant Professor, Postgraduate Department of Computer Applications, Government Arts College (Autonomous), Coimbatore 641018. JAVA PROGRAMMING 18MCA32C Syllabus Objective: On successful completion of the course the students should have understood the Basic concept and fundamentals of core java classes, API, OOPS concept in Java and features of OOPS. UNIT I: The Genesis of Java - The Java class Libraries - Data types, Variables - Operators - Arrays. Control Statements: Selection statements - Iteration statements - Jump statements. Introducing classes: Class Fundamentals - Declaring objects - Methods. UNIT II: Constructors - this keyword - Garbage collection. Overloading Methods - Access controls - Nested and Inner classes. Inheritance: Inheritance basics - using Super - Method overriding - Dynamic method Dispatch - Abstract classes - using final with inheritance. Packages and Interfaces: Packages - Access protection - Importing Packages - Interfaces. UNIT III: Exception Handling: Exception Handling Fundamentals - Java’s Built in Exceptions - creating own Exception subclasses. Multithreaded Programming: The Java Thread Model - Creating a Thread - Synchronization - Inter Thread communication. UNIT IV: I/O Basics - Reading console Input -Writing Console Output - Reading and writing Files - Exploring java.io. Applet Fundamentals - Applet Basics - Introducing the AWT. UNIT V: Software Development using Java: Java Beans introduction - Servlets: Life cycle - A simple servlet - servlet API - Handling HTTP Request and Responses - Session tracking. Networking Basics - Remote Method Invocation (RMI) - Accessing Database with JDBC. TEXT BOOKS: 1. Herbert Schildt, “The Complete Reference Java 2”, 2nd Ed, Tata McGraw Hill (I) Pvt. Ltd.,2002. 2. H.M. Deitel and P. J. Deitel, “Java How to Program”, 6th Ed, PHI/Pearson Education Asia 2005. History of Java 1.
    [Show full text]
  • Java Programming Language, Java SE 6
    Java Programming Language, Java SE 6 Electronic Presentation SL-275-SE6 REV G.2 D61748GC11 Edition 1.1 Copyright © 2008, 2010, Oracle and/or its affiliates. All rights reserved. Disclaimer This document contains proprietary information, is provided under a license agreement containing restrictions on use and disclosure, and is protected by copyright and other intellectual property laws. You may copy and print this document solely for your own use in an Oracle training course. The document may not be modified or altered in any way. Except as expressly permitted in your license agreement or allowed by law, you may not use, share, download, upload, copy, print, display, perform, reproduce, publish, license, post, transmit, or distribute this document in whole or in part without the express authorization of Oracle. The information contained in this document is subject to change without notice. If you find any problems in the document, please report them in writing to: Oracle University, 500 Oracle Parkway, Redwood Shores, California 94065 USA. This document is not warranted to be error-free. Sun Microsystems, Inc. Disclaimer This training manual may include references to materials, offerings, or products that were previously offered by Sun Microsystems, Inc. Certain materials, offerings, services, or products may no longer be offered or provided. Oracle and its affiliates cannot be held responsible for any such references should they appear in the text provided. Restricted Rights Notice If this documentation is delivered to the U.S. Government or anyone using the documentation on behalf of the U.S. Government, the following notice is applicable: U.S.
    [Show full text]
  • Java (Programming Langua a (Programming Language)
    Java (programming language) From Wikipedia, the free encyclopedialopedia "Java language" redirects here. For the natural language from the Indonesian island of Java, see Javanese language. Not to be confused with JavaScript. Java multi-paradigm: object-oriented, structured, imperative, Paradigm(s) functional, generic, reflective, concurrent James Gosling and Designed by Sun Microsystems Developer Oracle Corporation Appeared in 1995[1] Java Standard Edition 8 Update Stable release 5 (1.8.0_5) / April 15, 2014; 2 months ago Static, strong, safe, nominative, Typing discipline manifest Major OpenJDK, many others implementations Dialects Generic Java, Pizza Ada 83, C++, C#,[2] Eiffel,[3] Generic Java, Mesa,[4] Modula- Influenced by 3,[5] Oberon,[6] Objective-C,[7] UCSD Pascal,[8][9] Smalltalk Ada 2005, BeanShell, C#, Clojure, D, ECMAScript, Influenced Groovy, J#, JavaScript, Kotlin, PHP, Python, Scala, Seed7, Vala Implementation C and C++ language OS Cross-platform (multi-platform) GNU General Public License, License Java CommuniCommunity Process Filename .java , .class, .jar extension(s) Website For Java Developers Java Programming at Wikibooks Java is a computer programming language that is concurrent, class-based, object-oriented, and specifically designed to have as few impimplementation dependencies as possible.ble. It is intended to let application developers "write once, run ananywhere" (WORA), meaning that code that runs on one platform does not need to be recompiled to rurun on another. Java applications ns are typically compiled to bytecode (class file) that can run on anany Java virtual machine (JVM)) regardless of computer architecture. Java is, as of 2014, one of tthe most popular programming ng languages in use, particularly for client-server web applications, witwith a reported 9 million developers.[10][11] Java was originallyy developed by James Gosling at Sun Microsystems (which has since merged into Oracle Corporation) and released in 1995 as a core component of Sun Microsystems'Micros Java platform.
    [Show full text]
  • Q. What Is Java ? Java Is a Programming Language and A
    GANDHI CHOWK Q. What is Java ? Java is a programming language and a platform. Java is a high level, robust, secured and object-oriented programming language. Platform: Any hardware or software environment in which a program runs, is known as a platform. Since Java has its own runtime environment (JRE) and API, it is called platform. Where it is used? According to Sun, 3 billion devices run java. There are many devices where java is currently used. Some of them are as follows: 1. Desktop Applications such as acrobat reader, media player, antivirus etc. 2. Web Applications such as irctc.co.in, javatpoint.com etc. 3. Enterprise Applications such as banking applications. 4. Mobile 5. Embedded System 6. Smart Card 7. Robotics 8. Games etc. TYPES OF JAVA APPLICATIONS There are mainly 4 type of applications that can be created using java programming: 1) Standalone Application It is also known as desktop application or window-based application. An application that we need to install on every machine such as media player, antivirus etc. AWT and Swing are used in java for creating standalone applications. 2) Web Application An application that runs on the server side and creates dynamic page, is called web application. Currently, servlet, jsp, struts, jsf etc. technologies are used for creating web applications in java. Ishwar Prakash(8271395373) 1 GANDHI CHOWK 3) Enterprise Application An application that is distributed in nature, such as banking applications etc. It has the advantage of high level security, load balancing and clustering. In java, EJB is used for creating enterprise applications.
    [Show full text]
  • Release Notes What's
    Release Notes Amster is a lightweight command-line interface, ideal for use in DevOps processes, such as continuous integration and deployment. Read these release notes before you install Amster. The information contained in these release notes cover prerequisites for installation, known issues and improvements to the software, changes and deprecated functionality, and other important information. ForgeRock Identity Platform® serves as the basis for our simple and comprehensive Identity and Access Management solution. We help our customers deepen their relationships with their customers, and improve the productivity and connectivity of their employees and partners. For more information about ForgeRock and about the platform, see https://www.forgerock.com. What’s New This page covers new features and improvements in Amster. What’s New in Amster 7.1 Support for AM 7.1 or Later Only Amster 7.1 supports exporting and importing conguration from AM 7.1 or later. If you have a previous version of Amster: 1. Perform a fresh installation of Amster 7.1. For more information, see Install Amster. 2. Migrate any Amster Groovy scripts from the previous Amster installation. Take into account any changes in functionality. 3. Convert any JSON conguration les that were exported from AM 5 or later. The AM 7.1 ZIP le includes a conguration le upgrade tool. For more information on converting conguration les for import into AM 7.1, see the README.md le in the Config-Upgrader-7.1.0.zip le. 4. Test the new Amster installation. 5. Delete the previous Amster installation. Before You Install This page covers software and hardware prerequisites for installing and running Amster.
    [Show full text]
  • Supporting C Extensions for Dynamic Languages an Abbreviated Version of [10]
    High-Performance Language Composition: Supporting C Extensions for Dynamic Languages An abbreviated version of [10]. Grimmer Matthias1, Chris Seaton2, Thomas W¨urthinger2 and Hanspeter M¨ossenb¨ock1 1 Johannes Kepler University, Linz, Austria fgrimmer,[email protected] 2 Oracle Labs fchris.seaton,[email protected] Abstract. Many dynamic languages such as Ruby offer functionality for writing parts of applications in a lower-level language such as C. These C extension modules are usually written against the API of an interpreter, which provides access to the higher-level language's internal data struc- tures. Alternative implementations of the high-level languages often do not support such C extensions because implementing the same API as in the original implementations is complicated and limits performance. In this paper we describe a novel approach for modular composition of languages that allows dynamic languages to support C extensions through interpretation. We propose a flexible and reusable cross-language mechanism that allows composing multiple language interpreters. This mechanism allows us to efficiently exchange runtime data across different interpreters and also enables the dynamic compiler of the host VM to inline and optimize programs across multiple language boundaries. We evaluate our approach by composing a Ruby interpreter with a C interpreter. We run existing Ruby C extensions and show how our system executes combined Ruby and C modules on average over 3× faster than the conventional implementation of Ruby with native C extensions. 1 Introduction Most programming languages offer functionality for calling routines in modules that are written in another language. There are multiple reasons why program- mers want to do this, including to run modules already written in another lan- guage, to achieve higher performance than is normally possible in the primary language, or generally to allow different parts of the system to be written in the most appropriate language.
    [Show full text]
  • History of Java the History of Java Is Very Interesting. Java Was Originally Designed for Interactive Television, but It Was
    History of Java The history of Java is very interesting. Java was originally designed for interactive television, but it was too advanced technology for the digital cable television industry at the time. The history of java starts with Green Team. Java team members (also known as Green Team), initiated this project to develop a language for digital devices such as set-top boxes, televisions, etc. However, it was suited for internet programming. Later, Java technology was incorporated by Netscape. The principles for creating Java programming were "Simple, Robust, Portable, Platform-independent, Secured, High Performance, Multithreaded, Architecture Neutral, Object-Oriented, Interpreted and Dynamic". Currently, Java is used in internet programming, mobile devices, games, e-business solutions, etc. There are given the significant points that describe the history of Java. 1) James Gosling, Mike Sheridan, and Patrick Naughton initiated the Java language project in June 1991. The small team of sun engineers called Green Team. 2) Originally designed for small, embedded systems in electronic appliances like set-top boxes. 3) Firstly, it was called "Greentalk" by James Gosling, and file extension was .gt. 4) After that, it was called Oak and was developed as a part of the Green project. Why Java named "Oak"? 5) Why Oak? Oak is a symbol of strength and chosen as a national tree of many countries like U.S.A., France, Germany, Romania, etc. 6) In 1995, Oak was renamed as "Java" because it was already a trademark by Oak Technologies. Why Java Programming named "Java"? 7) Why had they chosen java name for java language? The team gathered to choose a new name.
    [Show full text]
  • 100% Pure Java Cookbook Use of Native Code
    100% Pure Java Cookbook Guidelines for achieving the 100% Pure Java Standard Revision 4.0 Sun Microsystems, Inc. 901 San Antonio Road Palo Alto, California 94303 USA Copyrights 2000 Sun Microsystems, Inc. All rights reserved. 901 San Antonio Road, Palo Alto, California 94043, U.S.A. This product and related documentation are protected by copyright and distributed under licenses restricting its use, copying, distribution, and decompilation. No part of this product or related documentation may be reproduced in any form by any means without prior written authorization of Sun and its licensors, if any. Restricted Rights Legend Use, duplication, or disclosure by the United States Government is subject to the restrictions set forth in DFARS 252.227-7013 (c)(1)(ii) and FAR 52.227-19. The product described in this manual may be protected by one or more U.S. patents, foreign patents, or pending applications. Trademarks Sun, the Sun logo, Sun Microsystems, Java, Java Compatible, 100% Pure Java, JavaStar, JavaPureCheck, JavaBeans, Java 2D, Solaris,Write Once, Run Anywhere, JDK, Java Development Kit Standard Edition, JDBC, JavaSpin, HotJava, The Network Is The Computer, and JavaStation are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and certain other countries. UNIX is a registered trademark in the United States and other countries, exclusively licensed through X/Open Company, Ltd. All other product names mentioned herein are the trademarks of their respective owners. Netscape and Netscape Navigator are trademarks of Netscape Communications Corporation in the United States and other countries. THIS PUBLICATION IS PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
    [Show full text]
  • Supporting C Extensions for Dynamic Languages
    Dynamically Composing Languages in a Modular Way: Supporting C Extensions for Dynamic Languages Matthias Grimmer Chris Seaton Thomas Wurthinger¨ Johannes Kepler University, Austria Oracle Labs, United Kingdom Oracle Labs, Switzerland [email protected] [email protected] [email protected] Hanspeter Mossenb¨ ock¨ Johannes Kepler University, Austria [email protected] Abstract Keywords Cross-language, Language Interoperability, Virtual Many dynamic languages such as Ruby, Python and Perl offer some Machine, Optimization, Ruby, C, Native Extension kind of functionality for writing parts of applications in a lower- level language such as C. These C extension modules are usually 1. Introduction written against the API of an interpreter, which provides access Most programming languages offer some kind of functionality for to the higher-level language’s internal data structures. Alternative calling routines in modules that are written in another language. implementations of the high-level languages often do not support There are multiple reasons why programmers want to do this, in- such C extensions because implementing the same API as in the cluding to run modules already written in another language, to original implementations is complicated and limits performance. achieve higher performance than is normally possible in the pri- In this paper we describe a novel approach for modular com- mary language, or generally to allow different parts of the system position of languages that allows dynamic languages to support to be written in the most appropriate language. C extensions through interpretation. We propose a flexible and Dynamically typed and interpreted languages such as Perl, reusable cross-language mechanism that allows composing mul- Python and Ruby often provide support for running extension mod- tiple language interpreters, which run on the same VM and share ules written in the lower-level language C, known as C extensions the same form of intermediate representation – in this case abstract or native extensions.
    [Show full text]
  • Java (Software Platform) from Wikipedia, the Free Encyclopedia Not to Be Confused with Javascript
    Java (software platform) From Wikipedia, the free encyclopedia Not to be confused with JavaScript. This article may require copy editing for grammar, style, cohesion, tone , or spelling. You can assist by editing it. (February 2016) Java (software platform) Dukesource125.gif The Java technology logo Original author(s) James Gosling, Sun Microsystems Developer(s) Oracle Corporation Initial release 23 January 1996; 20 years ago[1][2] Stable release 8 Update 73 (1.8.0_73) (February 5, 2016; 34 days ago) [±][3] Preview release 9 Build b90 (November 2, 2015; 4 months ago) [±][4] Written in Java, C++[5] Operating system Windows, Solaris, Linux, OS X[6] Platform Cross-platform Available in 30+ languages List of languages [show] Type Software platform License Freeware, mostly open-source,[8] with a few proprietary[9] compo nents[10] Website www.java.com Java is a set of computer software and specifications developed by Sun Microsyst ems, later acquired by Oracle Corporation, that provides a system for developing application software and deploying it in a cross-platform computing environment . Java is used in a wide variety of computing platforms from embedded devices an d mobile phones to enterprise servers and supercomputers. While less common, Jav a applets run in secure, sandboxed environments to provide many features of nati ve applications and can be embedded in HTML pages. Writing in the Java programming language is the primary way to produce code that will be deployed as byte code in a Java Virtual Machine (JVM); byte code compil ers are also available for other languages, including Ada, JavaScript, Python, a nd Ruby.
    [Show full text]
  • APPENDIX a the Java API Packages
    APPENDIX A The Java API Packages The JDK provides many packages (JDK 1.1 had 26 packages) and others are being developed (such as the 2D, 3D and Media packages). You must prefIx the names of the packages in Table A.I with "java.". TABLE A.1 The Java API packages PackaKe name Contents applet Applet related classes awt Platform-independent windowing classes awt.datatransfer Support for cut and paste style operations awt.event DeleKation event model classes awt.image Image manipulation classes awt.peer Native windowing facilities classes beans Beans facilities for developers io Input and output classes lang Basic Java classes lang. reflect Java reflection classes math BigDecimal and BigInteger classes net Java networking facilities rmi Remote method invocation classes rmi.dgc Distributed garbage collection rmi.registry Facilities for mapping names to remote objects rmi.server Facilities for the server side of RMI security Java Security for signed applets security.acl Access control list security. interfaces Digital Signature Algorithm interface specifIcations sql JDBC SQL interface classes text Internationalization facilities 428 Java and Object Orientation util General utili classes util.zip Java Archive (JAR) su ort classes For further information on these packages, see books such as Chan and Lee (1996) and Gosling and Yellin (1996). APPENDIXB The java.lang Package B.l INTRODUCTION The java. lang package contains the classes and interfaces which are the basis of the Java environment (as distinct from the Java language). For example, the class Obj ect (the root of all classes) is defined in this package. This package is automatically imported into every Java program (whether it is an application or an applet).
    [Show full text]
  • Mac OS X for Java™ Geeks by Will Iverson
    [ Team LiB ] • Table of Contents • Index • Reviews • Reader Reviews • Errata Mac OS X for Java™ Geeks By Will Iverson Publisher : O'Reilly Pub Date : April 2003 ISBN : 0-596-00400-1 Pages : 296 Mac OS X for Java Geeks delivers a complete and detailed look at the Mac OS X platform, geared specifically at Java developers. Programmers using the 10.2 (Jaguar) release of Mac OS X, and the new JDK 1.4, have unprecedented new functionality available to them. Whether you are a Java newbie, working your way through Java Swing and classpath issues, or you are a Java guru, comfortable with digital media, reflection, and J2EE, this book will teach you how to get around on Mac OS X. You'll also get the latest information on how to build applications that run seamlessly, and identically, on Windows, Linux, Unix, and the Mac. [ Team LiB ] [ Team LiB ] • Table of Contents • Index • Reviews • Reader Reviews • Errata Mac OS X for Java™ Geeks By Will Iverson Publisher : O'Reilly Pub Date : April 2003 ISBN : 0-596-00400-1 Pages : 296 Copyright Preface Organization Conventions Used in This Book Comments and Questions Acknowledgments Chapter 1. Getting Oriented Section 1.1. All Those Confusing Names Section 1.2. Why Now? Chapter 2. Apple's Java Platform Section 2.1. Apple JVM Basics Section 2.2. Apple's JVM Directory Layout Section 2.3. Additional APIs and Services Section 2.4. Going Forward Chapter 3. Java Tools Section 3.1. Terminal Section 3.2. Code Editors Section 3.3. Jakarta Ant Section 3.4.
    [Show full text]