- Java is simple. That simplicity derives from syntax similar to C/C++ and the omission of complex C/C++ features such as multiple implementation inheritance, pointers, and operator overloading.
- Java is object-oriented. Java’s object-oriented nature encourages a developer to think in terms of classes and objects rather than separate code and data. That class/object focus results in code that is easier to write, easier to maintain, and easier to reuse.
- Java is network-savvy. A TCP/IP library simplifies the development of programs that communicate with HTTP, FTP, and other TCP/IP network processes. Furthermore, the library’s use of the same stream-oriented mechanism for communicating with remote network processes that file-oriented code uses to communicate with files on a computer’s local hard drive helps a developer write network code faster.
- Java is interpreted. Java’s compiler translates source code into class files of bytecode instructions. A virtual machine examines each instruction and uses that instruction’s meaning to execute an equivalent sequence of platform-dependent instructions. Interpretation speeds up the development process and simplifies debugging.
- Java is robust. Errant programs do not crash the virtual machine or corrupt the underlying (native) platform. Robustness is achieved, in part, by not supporting C/C++ pointers, by providing a garbage collector to automatically free up dynamically allocated memory (instead of forcing the developer to accomplish that task), by performing strict compile-time/runtime type checking, and by providing true arrays with bounds checking.
- Java is secure. Java’s "sandbox" security model identifies sensitive operations (such as file I/O) that a malicious program can exploit to harm the native platform, and provides a mechanism for allowing or preventing access to those operations.
- Java is architecture-neutral. A compiled Java program’s bytecode instructions target a generic virtual machine instead of a specific platform. Because each platform-specific virtual machine implementation supplies a consistent interface to the bytecodes, the same Java program runs on diverse platforms (via their virtual machines).
- Java is portable. Portability is achieved through architecture neutrality and through a strict definition of the language (which permits no implementation-dependent features). For example, Java’s integer primitive type always means a signed 2’s complement 32-bit integer. In contrast, the C/C++ integer type can be unsigned, and its size varies according to a platform’s register size (typically 32 bits or 64 bits).
- Java is high-performance. Many virtual machines use a just-in-time (JIT) compiler to dynamically compile a program’s bytecode instructions into platform-specific instructions (which execute faster than bytecodes) as the program runs.
- Java is multithreaded. Support for threads is built into the language via thread-synchronization primitives. There is also a thread library.
- Java is dynamic. Java’s use of an interface type to distinguish between what a program must do and how that task gets accomplished helps Java adapt to a continually evolving environment, and makes it easier for vendors to modify Java libraries without breaking program code that uses those libraries.
Java Reference Guide
Interface Design Best Practices in Object-Oriented API Design in Java
Before getting started, I'd like to clarify a few terms.
Designer vs. client programmers
Most Java programmers have two hats on their shelf, which they wear at different times. Sometimes they wear their "designer" hats and build libraries of classes for others to use; other times they wear their "client" hats and make use of a library of classes created by someone else. Some Java programmers even where both hats at the same time, completely oblivious to the rules of fashion.
One aspect of the flexibility of a body of code is the ease with which a client programmer can understand the code. Whether a client programmer is planning to change code or just use it as is, that programmer often has to figure out how to change or use the code by reading it.
The guidelines discussed in this book will talk about flexibility in terms of client programmers. Designs and implementations that are flexible are those that are easy for client programmers to understand, use, and change.
Read More/Get EbookAdvanced Programming for the Java 2 Platform
To help you navigate the Java APIs and fast-track your project development time, this book includes the design, development, test, and deployment phases for an enterprise-worthy auction application. While the example application does not cover every possible programming scenario, it explores many common situations and the discussions leave you with a solid methodology for designing and building your own solutions.
This book is for developers with more than a beginning level of understanding of writing programs in the Java programming language. The example application is written with the Java® 2 platform APIs and explained in terms of functional hows and whys, so if you need help installing the Java platform, setting up your environment, or getting your first application to work, you should first read a more introductory book such as Essentials of the Java Programming Language: A Hands-On Guide or The Java Tutorial.
Concurrent Programming Using Java
This is an introduction to using the Java programming language in concurrent or multithreaded applications. The context is the process synchronization material and related concurrent programming in operating systems courses as opposed to software engineering. Topics covered are race conditions when threads share data, critical sections, mutual exclusion, semaphores, monitors, message passing, the rendezvous, remote procedure calls, distributed or network programming, and parallel processing. Solutions to the classical problems talked about in operating systems courses (the dining philosophers, the bounded buffer producers and consumers, and the database readers and writers) are shown in Java. Also shown is how to animate algorithms using the command set of the Xtango animation interpreter, animator. Some of the animation examples can be viewed as applets.
These example programs were developed and tested using Sun Microsystem's JDK version 1.0.2 and 1.1 for Solaris 2.x and Windows 95/NT (1996--97). They have been updated to remove all ``deprecated'' methods and constructors. The multimachine socket examples use the readObject() and writeObject() methods of the ObjectInputStream and ObjectOutPutStream classes, which are part of the RMI (remote method invocation) add-on for JDK 1.0.2 and included with JDK 1.1.
All of the code examples described and hyperlinked here may be retrieved as a gzip tar archive or zip archive.
Java is designed to be a platform-independent language, so all of these examples, including the animated ones, will run without change on Sun's Solaris 2.x UNIX for Sparc and Microsoft Windows 95/NT for Intel-based PCs.
Securing Java
Java has grown by leaps and bounds since its introduction in 1996, and is now among the most popular computing platforms on the planet. Java has evolved and changed so much that at a mere two-years old, our original work, Java Security: Hostile Applets, Holes, and Antidotes, found itself in serious need of revision and expansion. This book is the result of several years of thinking about mobile code and security, and includes many things we have discovered while working on real-world systems with businesses and government agencies. Our goal is to present enough information to help you separate fact from fiction when it comes to mobile code security.
Java has become much more complicated and multifaceted than it was when it was introduced. No longer simply a client-side language for applets, Java can now be found on everything from enterprise application servers to embedded devices like smart cards. We have tried to address security factors from throughout the entire Java range in this book.
We hope this book appeals to geeks and grandmothers alike (not that some grandmothers aren't geeks). Although it gets technical in places, we hope the messages are clear enough that even the casual Web user comes away with a broader understanding of the security issues surrounding mobile code. We kept four groups in mind as we wrote this book: Web users, developers, system administrators, and business decision-makers. Many of the issues of mobile code security cut across these groups. As Java integrates itself into the foundations of electronic commerce, Java security issues take on more urgency.
Java is only one kind of mobile code among many. Other systems immersed in the same security dilemma include ActiveX, JavaScript, and Word Macros. It is essential not to get the wrong message from this book. Our focus on Java is no accident. We believe Java is the most viable mobile code system created to date. Don't believe that through our work we imply that other systems are any more secure than Java. Just the opposite is true.
With the introduction of code signing to Java (in JDK 1.1) and its enhancement with access control (in Java 2), securing Java became much harder. Java's position along the security/functionality tradeoff has moved significantly toward functionality, to the detriment of security. This is good if you want more functionality, which most businesses and developers seem to need, but it is bad if you are charged with managing security risks. Forming an intelligent Java use policy is more important than ever, but doing so is more complicated than it used to be.
Processing XML with Java
This book is written for experienced Java programmers who want to integrate XML into their systems. Java is the ideal language for processing XML documents. Its strong Unicode support in particular made it the preferred language for many early implementers. Consequently, more XML tools have been written in Java than in any other language. More open source XML tools are written in Java than in any other language. More programmers process XML in Java than in any other language.
Processing XML with Java will teach you how to:
Save XML documents from applications written in Java
Read XML documents produced by other programs
Search, query, and update XML documents
Convert legacy flat data into hierarchical XML
Communicate with network servers that send and receive XML data
Validate documents against DTDs, schemas, and business rules
Combine functional XSLT transforms with traditional imperative Java code
This book is meant for Java programmers who need to do anything with XML. It teaches the fundamentals and advanced topics, leaving nothing out. It is a comprehensive course in processing XML with Java that takes developers from little knowledge of XML to designing sophisticated XML applications and parsing complicated documents. The examples cover a wide range of possible uses including file formats, data exchange, document transformation, database integration, and more.
Apache Jakarta Commons
Exploring the Jakarta Commons, I first found a broad suite of what I would characterize as "utility" code—things that often wound up in my software in packages named things like "util." Digging deeper, I found useful libraries to solve common problems, interesting algorithms, and more. In brief, by using the Jakarta Commons, I found I spent less time reinventing the wheel, and more time solving the problem at hand.
Virtually every Java developer can take advantage of various Jakarta Commons components—from the utilities provided by the Collections andLang packages, through the networking components afforded by the HttpClient and Net packages. These components underlie Apache Tomcat, Struts, and countless other projects, helping move forward both the Java industry and the Java platform.
The first few chapters cover the more web-specific packages, including FileUpload, HttpClient, and the Net suite of protocol implementations. The Pool and DBCP packages are useful for a broader range of applications. BeanUtils and JXPath provide easier ways to work with objects. Logging, Lang, and Collections are a suite of tools applicable to almost every application. Codec provides a suite of specialized conversion routines, useful for data transfer, security, and (interestingly) phonetic analysis. Finally, the CLI package provides support for building command-line applications.
Read More/Get Ebook
Java Application Development on Linux
No doubt, there are a host of Java books on the market. We didn’t wake up one morning and say, “You know what the world really needs? Another book about Java!” No. What we realized was that there are a couple of “holes” in the Java book market.
First, Linux as a development platform and deployment platform for Java applications has been largely ignored. This is despite the fact that the *nix platform (meaning all UNIX and UNIX-like systems, Linux included) has long been recognized as one of the most programmer-friendly platforms in existence. Those few resources for Java on Linux that exist emphasize tools to the exclusion of the Java language and APIs.
Second, books on the Java language and APIs have focused on pedagogical examples that serve to illustrate the details of the language and its libraries, but very few of these examples are in themselves practically useful, and they tend to deal only with the issues of writing programs, and not at all with deploying and maintaining them. Anyone who has worked on a major software project, especially a software project that is developed and deployed in a business for a business, knows that designing and coding are only about half of the work involved. Yes, writing Java code is only slightly affected by the development and the deployment platform, but the process of releasing and maintaining such applications is significantly different between platforms....
Read More/Get Ebook
Sun Certified Java Programmer Pre-Exam Essentials
This version is written according to the objectives of the "Sun Certified Programmer For Java™ 2 Platform 1.4" exam. For those taking the 1.2 exam, the objectives no longer required for 1.4 have been retained towards the end of this document. The sections have "1.2 Exam Only" at the start of their titles. I would recommend doing the 1.4 exam instead, as it is more current and the only major new subject is assertions.
Aside: There is no 1.3 exam, as such. The 1.1 exam exam was replaced by a Java2 exam, which at the time seemed like it would suffice for all Java2 releases. However in September 2002 Sun released seperate 1.2 and 1.4 exams. The 1.2 syllabus is for 1.2 and 1.3.
Read More/Get EbookExploring Java - Free Ebook
Ebook - Java Fundamental Classes Reference
- Java is now more dynamic. An expanded Class class, in conjunction with the new java.lang.reflect package, allows objects to access methods and variables of objects that they were not compiled with.
- There are classes in java.io that build on the new dynamic capabilities to provide the ability to read and write objects as streams of bytes.
- There is increased support for internationalization. The support includes a Locale class and classes to format and parse data in locale-specific ways. There is also support for loading external locale-specific resources, such as textual strings.
- The java.util.zip package provides the ability to read and write compressed files.
- The java.math package provides the ability to perform arithmetic operations to any degree of precision that is necessary.
There are also more ways to package and distribute Java programs. In addition to being able to build command-line based applications and applets that are hosted by browsers, we now have the Java Servelet API that allows Java programs to function as part of a web server. Furthermore, the nature of applets may be changing. Instead of waiting for large applet to be downloaded by a browser, we now have push technologies such as Marimba's Castanet that ensure that the most current version of an applet is already on our machine when we want to run it.
Many new uses for Java have appeared or are on the horizon. For example, NASA is using Java applets to monitor telemetry data, instead of building more large, dedicated hardware consoles. Cellular phone manufacturers have committed to making cellular phone models that support Java, so in the future we may see Java programs that run on cellular phones and allow us to check e-mail or view location maps. Many additional APIs are also on the way, from Sun and other companies. These APIs not only supply infrastructure, but also provide frameworks for building domain-specific applications, in such areas as electronic commerce and manufacturing.
This java ebook is about the classes that provide the most fundamental infrastructure for Java. As you use this book, we hope that you will share our enthusiasm for the richness of what is provided and the anticipation of what is yet to come.
Java AWT Reference
This state of affairs raises obvious problems for my book. Nothing would have made me happier than to write a book that covered AWT 1.1 only. It would be significantly shorter, for one thing, and I wouldn't have to spend so much effort pointing out which features are present in which release. But that's not the current reality. For the time being, programmers still need to know about 1.0.2. Therefore, this book covers both releases thoroughly. There are many examples using 1.0.2; many more examples that require 1.1; and more examples showing you how to update 1.0.2 code to use 1.1's features.
Java Language Reference
- Inner classes, which include nested top-level classes and interfaces, member classes, local classes, and anonymous classes
- final local variables, method parameters, and catch clause parameters
- Instance initializers
- Blank finals, or final variable declarations that do not include initializers
- Class literals for obtaining Class objects
- Anonymous arrays, or arrays created and initialized without a variable initializer
Ebook - Java in a Nut Shell
This book is divided into five parts:
This first part of the book introduces Java and Java programming, with a particular emphasis on helping C and C++ programmers make the transition to Java. If you are already familiar with Java 1.0 programming, you can skip the three chapters in this part.
This second part of the book contains two chapters that introduce the new features of the Java 1.1 API and the new language features in Java 1.1.
This part contains example programs that demonstrate many of the new features of Java 1.1. You may find that these examples are a good starting point for your own programs, and you should feel free to adapt them for your own use. As explained below, this example section has changed a lot since the first edition of this book.
This part of the book contains reference material that describes the syntax of the Java language and the tools provided with the Java Development Kit (JDK), among other things.
This part is a quick reference for the Java API; it forms the bulk of the book. Please be sure to read the How To Use This Quick Reference material, which appears at the beginning of the part. It explains how to get the most out of the reference material.
Java FAQ's - Core, Advanced, Enterprises, Miscellaneous
- Language Fundamentals(147)
- Virtual Machine(19)
- Classes, Interfaces, & Pkgs(49)
- Exceptions(09)
- Applets(55)
- Abstract Window Toolkit(70)
- Events - JDK 1.1 and above(27)
- Drawing(38)
- Threads(21)
- Input, Output(38)
- Network(68)
- Miscellaneous(28)
Advance Java FAQ
- Servlets (12)
- JDBC (38)
- Swing (15)
- RMI (30)
- Java Beans(15)
- Java IO (10)
- Jini (09)
- CORBA (04)
- Browsers (07)
Java Lecture Notes
Week 1: Basic Java
Week 2: Procedural Java
Week 3: Introduction to java Objects
Week 4: More java ObjectsMidterm
Week 5: Introducing java Applets
Week 6: Java Components
Week 7: Java Events
Week 8: Java LayoutManagers, Windows, and Dialogs
Week 9: Java Images and Menus
Week 10: Java I/O and Streams
Week 11: Java Threads
Week 12: Java Network Programming
Week 13: Cut and Paste, Printing, Future Directions
Week 14: Final Exam
Read More/get this free ebook
Java an Object First Approach - Free Ebook
- Two Initial Applications
- An overview of Java classes
- The start of the Counters class hierarchy
- The completion of the Counters hierarchy
- The RoomMonitor class and MoneyRegister hierarchy
- The BasicMenu class
- The AdaptingMenu class
- Java Concurrent processes
- Java Keyboard input and formatted output
- The JulianDate Hierarchy
- Testing Software
- Java Streams
- Java Standard Iterative Data Structures
- Developer Supplied Data Structures.
- Dynamic and recursive data structures
- Java Graphical User Interfaces.
A Guide to Java Programming - Bleeding at the Keyboard
Java Version- How to Think Like a Computer Scientist - Fourth Edition
A Gentle Introduction to Java Programming
- Flags
In which draw colourful pictures using powerful java programming features.
- World Factbook I
In which we look at the countries of the world one at a time. We practice "if"
- Function
In which we calculate values
- Boxes
In which we practice conditions with two numbers
- World Factbook II
In which we use a loop to examine the CIA's World Factbook
- Strings
In which we manipulate and test strings.
- World Factbook II
In which we use an accumulating variable to count and sum.
- Using the documentation
In which we examine fonts.
- World Factbook III
In which we use the TreeMap Class.
- Bricks
In which we use for loops.
- Quilts
In which we practice a functional style of programming with immutable objects.
Reference: how to...
- Hello World
Some short, trival programs.
- Data types
Creating variables of different types. Converting between variable types.
- Control structures
We control program flow with while, for, foreach, if, return, break and other constructs
- Tests
We look at the different ways to test conditions.
- In-built function
We can use many functions provided by the core language. String and number functions primarily.
- In-built data structures
We can make use of arrays, hash tables and dates.
- Input and output
We explore the options for reading and writing data to files and to databases.
- Graphics
Drawing lines, polygons, strings and other shapes.
- Graphic User Interface
Buttons, text boxes that users can see and control.
- Programming techniques
Read More/Start Java TrainingAccumulating variables, recursion, function composition.
Essentials of the Java Programming Language, Part 1
The Java platform consists of the Java application programming interfaces (APIs) and the Java virtual machine (JVM).
Java Au Naturel - Guide to Object Oriented Design - Java 2 with Swing
Introduction to Programming Using Java, Fifth Edition
Introduction to Programming Using Java is a free introductory computer programming textbook that uses Java as the language of instruction. It is suitable for use in an introductory programming course and for people who are trying to learn programming on their own. There are no prerequisites beyond a general familiarity with the ideas of computers and programs. There is enough material for a full year of college-level programming. Chapters 1 through 7 can be used as a textbook in a one-semester college-level course or in a year-long high school course.
This version of the book covers "Java 5.0", and many of the examples use features that were not present in earlier versions of Java. (Sometimes, you will see this version of Java referred to as Java 1.5 instead of Java 5.0.) Note that Java applets appear throughout the pages of this book. Many of those applets will be non-functional in Web browsers that do not support Java 5.0.
The home web site for this book is http://math.hws.edu/javanotes/. The page at that address contains links for downloading a copy of the web site and for downloading a PDF version of the book.
In style, this is a textbook rather than a tutorial. That is, it concentrates on explaining concepts rather than giving step-by-step how-to-do-it guides. I have tried to use a conversational writing style that might be closer to classroom lecture than to a typical textbook. You'll find programming exercises at the end of most chapters, and you will find a detailed solution for each exercise, with the sort of discussion that I would give if I presented the solution in class. I strongly advise that you read the exercise solutions if you want to get the most out of this book. This is certainly not a Java reference book, and it is not even close to a comprehensive survey of all the features of Java. It is not written as a quick introduction to Java for people who already know another programming language. Instead, it is directed mainly towards people who are learning programming for the first time, and it is as much about general programming concepts as it is about Java in particular. I believe that Introduction to Programming using Java is fully competitive with the conventionally published, printed programming textbooks that are available on the market. (Well, all right, I'll confess that I think it's better.)
There are several approaches to teaching Java. One approach uses graphical user interface programming from the very beginning. Some people believe that object oriented programming should also be emphasized from the very beginning. This is not the approach that I take. The approach that I favor starts with the more basic building blocks of programming and builds from there. After an introductory chapter, I cover procedural programming in Chapters 2, 3, and 4. Object-oriented programming is introduced in Chapter 5. Chapters 6 covers the closely related topic of event-oriented programming and graphical user interfaces. Arrays are covered in Chapter 7. Chapter 8 marks a turning point in the book, moving beyond the fundamental ideas of programming to cover more advanced topics. Chapter 8 is mostly about writing robust and correct programs, but it also has a section on parallel processing and threads. Chapters 9 and 10 cover recursion and data structures, including the Java Collection Framework. Chapter 11 is about files and networking. Finally, Chapter 12 returns to the topic of graphical user interface programming to cover some of Java's more advanced capabilities.
Major changes have been made in the fifth edition. Perhaps the most significant change is the use of parameterized types in the chapter on generic programming. Parameterized types -- Java's version of templates -- were the most eagerly anticipated new feature in Java 5.0.
Other new features in Java 5.0 are also covered. Enumerated types are introduced, although they are not covered in their full complexity. The "for-each" loop is covered and is used extensively. Formatted output is also used extensively, and the Scanner class is covered (though not until Chapter 11). Static import is covered briefly, as are variable arity methods...........
Introduction to Computer Science using Java
Thinking in Java, 3rd ed. Revision 4.0
1000 Java Tips
JDiff - An HTML Report of API Differences
- Comparing J2SE1.4.2 and J2SE1.5.0b1. Report (KB, gzip'd tar) Download
- Comparing J2SE1.4.0 and J2SE1.4.1. Report (13KB, gzip'd tar) Download
- Comparing J2SE1.4.0 and J2SE1.4.1 including documentation and statistics. Report (528KB, gzip'd tar) Download
- Comparing J2SE1.3.1 and J2SE1.4. Report (456KB, gzip'd tar) Download
- Comparing J2SE1.3.1 and J2SE1.4 including documentation and statistics. Report (2.9MB, gzip'd tar) Download
Java API Specifications
- Java SE 6
- J2SE 1.5.0
- J2SE 1.4.2
- J2SE 1.3.1
Enterprise Edition
- Java EE 5
- J2EE 1.4
- J2EE 1.3
- J2EE 1.2.1
Micro Edition
- J2ME
Javacard
- Javacard
Java Web Services
- Java Web Services
XML
- XML
Other Technologies
- Java 3D
- Java Advanced Imaging (JAI)
- JavaBeans Activation Framework
- Java Communications
- JavaMail
- Java Media Framework (JMF)
- Java Speech
- Real-Time Specification for Java (RTSJ)
- Other Technologies
The Java Course
- The way of the program
- What is a programming language?
- What is a program?
- What is debugging?
- Formal and natural languages
- The first program
- Java Variables and types
- More printingVariables
- Assignment
- Printing variables
- Keywords
- Operators
- Order of operations
- Operators for Strings
- Composition
- Java Methods
- Floating-point
- Converting from double to int
- Math methods
- Composition
- Adding new methods
- Classes and methods
- Programs with multiple methods
- Methods with results
- Java Conditionals, graphics and recursion
- The modulus operator
- Conditional execution
- Alternative execution
- Chained conditionals
- Nested conditionals
- The return statement
- Type conversion
- Slates and Graphics objects
- Invoking methods on a Graphics object
- Coordinates
- A lame Mickey Mouse
- Other drawing commands
- Recursion
- fractal Mickey Mouse
- Stack diagrams for recursive methods
- Convention and divine law
- Fruitful Java methods
- Return values
- Program development
- Composition
- Overloading
- Boolean expressions
- Logical operators
- Boolean methods
- More recursion
- Leap of faith
- One more example
- Java Iteration
- Multiple assignment
- Iteration
- The while statement
- Tables
- Two-dimensional tables
- Encapsulation and generalization
- Methods
- More encapsulation
- Local variables
- More generalization
- Java Strings and things
- Invoking methods on objects
- LengthTraversal
- Run-time errors
- Reading documentation
- The indexOf method
- Looping and counting
- Increment and decrement operators
- Character arithmetic
- Strings are immutable
- Strings are incomparable
- Java Interesting objects
- What's interesting?
- Packages
- Point objects
- Instance variables
- Objects as parameters
- Rectangles
- Objects as return types
- Objects are mutableAliasingnull
- Garbage collection
- Objects and primitives
- Create your own Java objects
- Class definitions and object types
- Time
- Constructors
- More constructors
- Creating a new object
- Printing an object
- Operations on objects
- Pure functions
- Modifiers
- Fill-in methods
- Which is best?
- Incremental development vs. planning
- Generalization
- Algorithms
- Arrays
- Arrays of Objects
- Objects of Arrays
- Object-oriented programming
- Linked lists
- Stacks
- Queues and Priority Queues
- Trees
- HeapTable
- Appendix
- Index
JDK 1.4 Tutorial
Whatever their origin, these features extend Java’s capabilities, encapsulating complex functionality behind simple abstractions. Some of the features help integrate Java further into the host operating system, providing direct access to services that had previously only been accessible to native code.
This book is decidedly code-centric. The central feature of each chapter is a program or set of programs that demonstrate the subject of the chapter within a complete, real-world program. Although each chapter starts with an overview of its topic and outlines the main classes and methods of the crucial packages, it does not duplicate information that can easily be found in the Java documentation.
Sun Java Tutorials
- Getting Started — An introduction to Java technology and lessons on installing Java development software and using it to create a simple program.
- Learning the Java Language — Lessons describing the essential concepts and features of the Java Programming Language.
- Essential Java Classes — Lessons on exceptions, basic input/output, concurrency, regular expressions, and the platform environment.
- Collections — Lessons on using and extending the Java Collections Framework.
- Swing — An introduction to the Swing GUI toolkit, with an overview of features and a visual catalog of components. See below for a more comprehensive tutorial on Swing.
- Deployment — How to package applications and applets using JAR files, and deploy them using Java Web Start and Java Plug-in.
- Preparation for Java Programming Language Certification — List of available training and tutorial resources.
These trails and lessons are only available as web pages.
- Custom Networking — An introduction to the Java platform's powerful networking features.
- The Extension Mechanism — How to make custom APIs available to all applications running on the Java platform.
- Full-Screen Exclusive Mode API — How to write applications that more fully utilize the user's graphics hardware.
- Generics — An enhancement to the type system that supports operations on objects of various types while providing compile-time type safety. Note that this lesson is for advanced users. The Java Language trail contains a Generics lesson that is suitable for beginners.
- Internationalization — An introduction to designing software so that it can be easily be adapted (localized) to various languages and regions.
- JavaBeans — The Java platform's component technology.
- JDBC Database Access — Introduces an API for connectivity between the Java applications and a wide range of databases and a data sources.
- JMX— Java Management Extensions provides a standard way of managing resources such as applications, devices, and services.
- JNDI— Java Naming and Directory Interface enables accessing the Naming and Directory Service such as DNS and LDAP.
- RMI — The Remote Method Invocation API allows allows an object to invoke methods of an object running on another Java Virtual Machine.
- Reflection — An API that represents ("reflects") the classes, interfaces, and objects in the current Java Virtual Machine.
- Security — Java platform features that help protect applications from malicious software.
- Sound — An API for playing sound data from applications.
- 2D Graphics — How to display and print 2D graphics in applications.
Free ebook - Java Object-oriented Program Design and Software Engineering
- Java Introduction,Administration, and Procedural Programming
- Java Classes
- The Java String data type
- Java Inheritance
- Java Interfaces
- Java OOP Design and Design Process
- Java Error and Exception Handling
- Java Stream I/O
- Window Systems and Graphics
- Event-based Programming
- Java GUI Components (Widgets)
- Java Threads
- Java Network Programming
- Java Software Development Cycle
- Misc. Topics in Java
- Java on the Web - Java in the Browser: Applets
- Java Component Object Models
- Java OOP
- Java Software Patterns
- Persistence, Databases, and Transactions, XML
- Internationalization and Localisation
Moreover this free java ebook covers lecture videos . They are Introduction to Java, Classes, Inheritance & Polymorphism, Interfaces and interfaces, Design & Design Process, Exceptions & Error Handling, I/O, Window Systems & Graphics, Event-based programming, GUI (widgets), Threads, Network Programming, Software Design Cycle, OOP , Layouts, Packages, & Jar files, Java on the web, Component Object Models, Overview of Software Patterns and Persistence & Databases & etc.
Free java ebook - Introduction to Java OOA/OOD for Web Applications
Contents
-
Credits and Other Material
-
Why OO?
-
Benefits of object-oriented programming
-
Symptoms of software development problems
-
Root causes of project failure
-
Software development best practices
-
Introduction to OO concepts
-
Encapsulation
-
Inheritance
-
Polymorphism
-
Abstraction with objects
-
Message passing
-
UML summary
Standard diagrams
-
Object Oriented Software Development
-
Why have a process?
The Rational Unified Process (RUP)
-
Inception phase
-
Elaboration
Construction phase
-
Transition
-
A sample process
-
Domain modeling
-
Use case modeling
-
Robustness analysis
-
Interaction modeling
-
Collaboration and State Modeling
-
Addressing Requirements
-
Survey of Design Patterns
-
Agile Methods
-
The Agile Alliance
-
Introduction to Extreme Programming
-
Risk: The Basic Problem
-
Four Variables
-
The Cost of Change
-
Four Values
-
Basic Principles
-
Back to Basics
-
The Solution
-
OO Summary
-
OO Concepts
-
UML
-
Introduction
-
Chapter objectives
-
Java design goals
-
What is Java?
-
How/where to get Java
-
First Steps with Java
-
Java Commands and Utilities
-
A first application
-
main
-
Variables, constants, and keywords
-
Primitive data types
-
Literals
-
Constants
-
Reserved keywords
-
Arrays
-
Strings
-
String objects
-
StringBuffer class
-
Comments and Javadoc
-
Types of comments
-
Javadoc comment tags
-
A comment example
-
Notes on Usage
-
Flow control and loops
-
Introduction
-
Objectives
-
Statements and blocks
-
if-else
-
switch
-
while and do-while
-
for
-
Labels
-
break
-
continue
-
return
-
No goto Statement
-
Classes and objects
-
Introduction
Objectives
-
A Simple Class
-
Fields
Access Control and Inheritance
-
Creating Objects
-
Constructors
-
Methods
-
this
-
Overloading methods
-
Overriding methods
-
Static members
-
Initialization Blocks
-
Garbage collection and finalize
-
The toString() Method
-
Native Methods
-
Methods and parameters
-
Methods
-
Extending Classes
-
Introduction
-
Objectives
-
An extended class
-
A simple example
-
What protected really means
-
Constructors in extended classes
-
Overriding methods, hiding fields, and nested classes
-
Marking methods and classes final
-
The object class
-
Anonymous classes
-
Abstract Classes and methods
Cloning objects
-
Extending classes: how and when
-
Designing a class to be extended
-
Interfaces
-
Introduction
-
Objectives
-
An example interface
-
Single inheritance versus multiple inheritance
Extending Interfaces
-
Implementing Interfaces
-
Using an Implementation
-
Marker Interfaces
-
When to Use Interfaces
-
Exceptions
-
Introduction
-
Objectives
-
Creating exception types
-
throw
-
The throws clause
-
try, catch, and finally
-
When to use exceptions
-
Packages
-
Introduction
-
Package Naming
-
Package Access
-
Package Contents
-
Examples
-
Objectives
IO: Streams and readers
Java networking
Introduction
Socket
ServerSocket
ServerSocket lifecycle
URL
URLConnection
-
Threads
-
Objectives
- Thread methods
- Thread references
- JavaBeans
- Remote Method Invocation (RMI)
- Java Native Interface (JNI)
- Collections framework
- Lists
- Maps
- Collection Utilities
- Internationalization, localization, and formatting
- HTTP protocol
- Request and Response
- Cookies
- Servlets and JSPs
- Objectives
- Introduction/Background
- Servlets
- Objectives
- Servlet basics
- HelloWorldServlet
- Servlet lifecycle
- HTTPServlet
- HTTPServletRequest
- HTTPServletResponse
- JavaServer Pages
- What is a JSP?
- JSP engine/container:
- Translation time and request time
- Scriptlets
- Expressions
- Declarations
- Directives
- Implicit objects
- Exception handling
- Survey of other server-side Java technologies
- XML
- XSLT
- Enterprise Java Beans
- Java Messaging Service
- Databases and JDBC
- Getting things set up
- Connecting to the database
- Statements
- getXXX methods
- Updating the database
- PreparedStatements
- A real method
- JUnit
- Is Testing Important?
- Mars Orbiter
- USS Yorktown
- Types of tests
- Unit Testing 101
- Goals of unit testing?
- Unit Testing with JUnit
- A sample JUnit session
- Recap
- Best practices
- Refactoring
- Final project
- Bibliography
Free java ebook - Programming Principles in Java: Architectures and Interfaces
1.1 What is a Computer? 1
1.2 Computer Programming 2
1.3 Programs Are Objects 5
1.4 Operating Systems and Windows 6
1.5 Software Architecture 8
1.5.1 Class Diagrams 9
1.6 Summary 11
1.7 Beyond the Basics 13
1.7.1 Stepwise Refinement 14
1.7.2 Object-Oriented Design 15
1.7.3 Classes Generate Objects 17
1.7.4 Frameworks and Inheritance 18
2.1 An Application and its Architecture 20
2.2 How to Build and Execute an Application 23
2.2.1 Using an IDE 23
2.2.2 Using the JDK 28
2.3 How the Application Works 30
2.3.1 An Execution Trace of the Application 33
2.4 How One Object Constructs Another 35
2.5 Repairing Compiler Error Messages 41
2.6 Summary 43
2.7 Programming Exercises 46
2.8 Beyond the Basics 47
2.8.1 Syntax 47
2.8.2 Semantics 49
2.8.3 Java Packages 51
2.8.4 Java API 51
3.1 Integer Arithmetic 57
3.2 Named Quantities: Variables 59
3.2.1 Variables Can Vary: Assignments 63
3.3 Arithmetic with Fractions: Doubles 68
3.4 Booleans 72
3.5 Operator Precedences 74
3.6 Strings, Characters, and their Operations 75
3.7 Data-Type Checking 80
3.8 Input via Program Arguments 83
3.8.1 Converting between Strings and Numbers and Formatting 86
3.8.2 Temperature Conversion with Input 88
3.9 Diagnosing Errors in Expressions and Variables 92
3.10 Java Keywords and Identifiers 95
3.11 Summary 95
3.12 Programming Projects 97
3.13 Beyond the Basics 102
3.13.1 Longs, Bytes, and Floats 102
3.13.2 Helper Methods for Mathematics 103
3.13.3 Syntax and Semantics of Expressions and Variables 105
4.1 Interactive Input 108
4.1.1 Dialog Output 112
4.2 Graphical Output 113
4.2.1 Panels and their Frames 113
4.2.2 Customizing Panels with Inheritance 115
4.3 Format and Methods for Painting 122
4.3.1 Constructor Methods and this Object 124
4.4 Objects with State: Field Variables 130
4.4.1 Using Fields to Remember Inputs and Answers 135
4.4.2 Scope of Variables and Fields 140
4.5 Testing a Program that Uses Input 142
4.6 Summary 144
4.7 Programming Projects 147
4.8 Beyond the Basics 151
4.8.1 Scope of Variables and Fields 151
4.8.2 Partial API for JFrame 152
4.8.3 Methods for GregorianCalendar 152
4.8.4 Colors for Graphics 152
5.8.5 Applets 153
5.1 Methods 158
5.2 Public Methods 159
5.2.1 Basic Public Methods 160
5.2.2 Constructor Methods 164
5.3 Parameters to Methods 168
5.3.1 Forms of Parameters 173
5.4 Case Study: General Purpose Output Frame 179
5.5 Results from Methods: Functions 186
5.6 Private Methods 193
5.7 Summary 200
5.8 Programming Projects 203
5.9 Beyond the Basics 212
5.9.1 Naming Variables, Methods, and Classes 212
5.9.2 Generating Web Documentation with javadoc 213
5.9.3 Static Methods 217
5.9.4 How the Java Compiler Checks Typing of Methods 220
5.9.5 Formal Description of Methods 221
5.9.6 Revised Syntax and Semantics of Classes 227
6.1 Control Flow and Control Structure 230
6.2 Condtional Control Structure 231
6.2.1 Nested Conditional Statements 235
6.2.2 Syntax Problems with Conditionals 240
6.3 Relational Operations 241
6.4 Uses of Conditionals 245
6.5 Altering Control Flow 249
6.5.1 Exceptions 250
6.5.2 System Exit 251
6.5.3 Premature Method Returns 252
6.6 The Switch Statement 252
6.7 Model and Controller Components 255
6.7.1 Designing an Application with a Model-View-Controller Architecture 257
6.8 Case Study: Bank Accounts Manager 259
6.8.1 Collecting Use-Case Behaviors 259
6.8.2 Selecting a Software Architecture 261
6.8.3 Specifying the Model 261
6.8.4 Writing and Testing the Model 261
6.8.5 Specifying the View Components 265
6.8.6 A Second Look at the Software Architecture 265
6.8.7 Writing the View Classes 265
6.8.8 Controller Construction and Testing 272
6.8.9 Testing the Assembled Application 276
6.8.10 Multiple Objects from the Same Class 277
6.9 More about Testing Methods and Classes 283
6.9.1 Testing Individual Methods 283
6.9.2 Testing Methods and Attributes Together 283
6.9.3 Testing a Suite of Methods 284
6.9.4 Execution Traces 285
6.10 Summary 286
6.11 Programming Projects 290
6.12 Beyond the Basics 295
6.12.1 The Logic of the Conditional Statement 295
6.12.2 Interface Specifications and Integration 300
7.1 Repetition 305
7.2 While Loops 306
7.3 Definite Iteration 308
7.3.1 Definite-Iteration Example: Painting a Bulls-Eye 153
7.4 Nontermination 319
7.5 Indefinite Iteration: Input Processing 321
7.5.1 Indefinite Iteration: Searching 324
7.6 For-Statements 328
7.7 Nested Loops 329
7.8 Writing and Testing Loops 335
7.9 Case Study: Bouncing Ball Animation 338
7.10 Recursion 347
7.10.1 An Execution Trace of Recursion 352
7.11 Counting with Recursion 356
7.11.1 Loops and Recursions 359
7.11.2 Counting with Multiple Recursions 360
7.12 Drawing Recursive Pictures 363
7.13 Summary 366
7.14 Programming Projects 370
7.15 Beyond the Basics 378
7.15.1 Loop Termination with break 379
7.15.2 The do-while Loop 380
7.15.3 Loop Invariants 381
7.15.4 Loop Termination 386
7.12.5 More Applets 387
8.1 Why We Need Arrays 392
8.2 Collecting Input Data within Arrays 396
8.3 Translation Tables 399
8.4 Internal Structure of One-Dimensional Arrays 402
8.5 Arrays of Objects 406
8.6 Case Study: Databases 3409
8.6.1 Behaviors 412
8.6.2 Architecture 413
8.6.3 Specifications 413
8.6.4 Implementation 415
8.6.5 Forms of Records and Keys 420
8.7 Case Study: Playing Pieces for Card Games 424
8.8 Two-Dimensional Arrays 431
8.9 Internal Structure of Two-Dimensional Arrays 434
8.10 Case Study: Slide-Puzzle Game 437
8.11 Testing Programs with Arrays 446
8.12 Summary 448
8.13 Programming Projects 450
8.14 Beyond the Basics 458
8.14.1 Sorting 458
8.14.2 Searching 462
8.14.3 Time-Complexity Measures 465
8.14.4 Divide-and-Conquer Algorithms 469
8.14.5 Formal Description of Arrays 477
9.1 Why We Need Specifications 484
9.2 Java Interfaces 485
9.2.1 Case Study: Databases 493
9.3 Inheritance 497
9.4 Reference Types, Subtypes, and instanceof 500
9.5 Abstract Classes 508
9.5.1 Case Study: Card Players 509
9.5.2 Class Hierarchies 516
9.5.3 Frameworks and Abstract Classes 519
9.6 Subtypes versus Subclasses 519
9.7 class Object and Wrappers 520
9.8 Packages 522
9.8.1 Generating Package APIs with javadoc 524
9.9 Case Study: An Adventure Game 526
9.9.1 Interfaces and Inheritance Together 532
9.9.2 Inheritance of Interfaces 539
9.10 Summary 539
9.11 Programming Projects 543
9.12 Beyond the Basics 544
9.12.1 Subclasses and Method Overriding 545
9.12.2 Semantics of Overriding 550
9.12.3 final components 555
9.12.4 Method Overloading 556
9.12.5 Semantics of Overloading 561
10.1 Model-View-Controller Revisited 565
10.2 Events 567
10.3 The AWT/Swing Class Hierarchy 568
10.4 Simple Windows: Labels and Buttons 571
10.5 Handling an Event 579
10.5.1 A View as Action Listener 579
10.5.2 A Separate Controller 583
10.5.3 A Button-Controller 583
10.6 Richer Layout: Panels and Borders 590
10.6.1 An Animation in a Panel 594
10.7 Grid Layout 600
10.8 Scrolling Lists 604
10.9 Text Fields 610
10.10 Error Reporting with Dialogs 617
10.11 TextAreas and Menus 620
10.11.1 Case Study: Text Editor 623
10.12 Event-Driven Programming with Observers 632
10.12.1 Observers and the MVC-Architecture 635
10.13 Summary 636
10.14 Programming Projects 641
10.15 Beyond the Basics 645
10.15.1 Applets 646
10.15.2 Tables and Spreadsheets 649
10.15.3 Handling Mouse Clicks and Drags 655
10.15.4 Threads of Execution 664
10.15.5 GUI Design and Use-Cases 669
10.15.6 Summary of Methods for Graphical Components 671
11.1 Strings are Immutable Objects 681
11.1.1 String Tokenizers 683
11.2 Sequential Files 686
11.2.1 Output to Sequential Files 688
11.2.2 Input from Sequential Files 690
11.3 Sequential Input from the Command Window 692
11.4 Case Study: Payroll Processing 695
11.5 Exceptions and Exception Handlers 700
11.5.1 Restarting a Method with an Exception Handler 702
11.5.2 Interactive Input with Exception Handlers 705
11.6 Exceptions Are Objects 706
11.6.1 Programmer-Generated Exceptions 713
11.7 Summary 714
11.8 Programming Projects 716
11.9 Beyond the Basics 719
11.9.1 Character-by-Character File Processing 719
11.9.2 Binary Files and Files of Objects 720
11.9.3 A Taxonomy of File Classes 721
11.9.4 A GUI for File Selection 730
Appendix II:Types and Subtypes 741
Appendix III:Class Diagrams 744
Index 748
Popular Posts
-
By David J. Eck I ntroduction to Programming Using Java is a free introductory computer programming textbook that uses Java as the language...
-
By Robert Sedgewick and Kevin Wayne This booksite supplements the forthcoming textbook Introduction to Computer Science in Java by Robert Se...
-
This post helps you to study java programming. Following free java ebooks focus on java tutorial, java swing, sun java interface, java strut...
-
By Mikalai Zaikin The purpose of this document is to help in preparation for exam CX-310-220 (Sun Certified Developer for Java Web Services)...
-
By Mikalai Zaikin The purpose of this document is to help in preparation for exam 310-052 (Sun Certified Enterprise Architect for Java EE 5)...
-
By David Schmidt, Kansas State University This free ebook entitiled "Programming Principles in Java: Architectures and Interfaces"...
-
By Patrick Niemeyer & Joshua Peck This ebook is about the Java language and programming environment. If you've been at all active on...
-
"Bleeding at the Keyboard" is a very nice java ebook and a good java guide teaches you modern programming with java. This java ebo...
-
By Mark Grand This book is a reference manual for the Java programming language; it covers Version 1.1 of the Java language. It provides a c...
-
By John Zukowski The Abstract Window Tookit (AWT) provides the user interface for Java programs. Unless you want to construct your own GUI o...