This java programming site aims to provide book reviews and free ebook on java tutorial, java swing, sun java interface, java struts, java examples, java documentations, java j2ee, java jvm, java util, java j2se, java plugin, java programming, java runtime, java script, java downloads, free java applets, java vm, java certification, java socket, java beans, java source code, java threads, java help, java database, java api, java 1.5, java file, java training, java developments, java tips,java web services, etc

Java Reference Guide

by Steven Haines
  • 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.
Read More/Get Ebook

Interface Design Best Practices in Object-Oriented API Design in Java

by Bill Venners
The books target intermediate Java programmers who want to become "better" Java programmers. They will help readers who are already familiar with the syntax and semantics of the Java language become more competent in actually using the Java language to solve real programming problems.
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 Ebook

Advanced Programming for the Java 2 Platform

As an experienced developer on the Java platform, you undoubtedly know how fast moving and comprehensive the platform is. Its many application programming interfaces (APIs) provide a wealth of functionality for all aspects of application and system-level programming. Real-world developers never use one or two APIs to solve a problem, but bring together key functionality spanning a number of APIs. Knowing which APIs you need, which parts of which APIs you need, and how the APIs work together to create the best solution can be a daunting task.

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.

Read More/Get Ebook

Concurrent Programming Using Java

By Stephen J. Hartley

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.

Read More/Get Ebook

Securing Java

By Gary McGraw and Edward Felten

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.

Read More/Get Ebook

Processing XML with Java

By Elliotte Rusty Harold
Welcome to Processing XML with Java, a complete tutorial about writing Java programs that read and write XML documents. This is the most comprehensive and up-to-date book about integrating XML with Java (and vice versa) you can buy. It contains over 1000 pages of detailed information on SAX, DOM, JDOM, JAXP, TrAX, XPath, XSLT, SOAP, and lots of other juicy acronyms. This book is written for Java programmers who want to learn how to read and write XML documents from their code.

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.

Read More/Get Ebook

Apache Jakarta Commons

By Will Iverson
I originally noticed the Jakarta Commons libraries while working with Apache Jakarta Tomcat. At some point, Tomcat started to include a suite of small libraries with commons in the name. They started to show up everywhere, in all sorts of other open source projects. At first, it was slightly off-putting—what exactly is commons-lang.jar, and why is this tiny library showing up in all of my software?
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

By Carl Albing and Michael Schwarz
Why another book on Java? Why a book on Java and Linux? Isn’t Java a platform independent system? Aren’t there enough books on Java? Can’t I learn everything I need to know from the Web?
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

The purpose of this document is to provide a basis for revising for the Sun Certified Programmer examinations, not to teach the Java language or the topics required for the exam. It is designed to collect all the essential information you need to retain, in one place, and is designed for someone who has already finished their own study and is about to take the exam.

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 Ebook

Exploring Java - Free Ebook

By Patrick Niemeyer & Joshua Peck
This ebook is about the Java language and programming environment. If you've been at all active on the Internet in the past year, you've heard a lot about Java. It's one of the most exciting developments in the history of the Internet, rivaling the creation of the World Wide Web. Java became the darling of the Internet programming community as soon as the alpha version was released. Immediately, thousands of people were writing Java applets to add to their Web pages. Interest in Java only grew with time, and support for Java in Netscape Navigator guaranteed it would be a permanent part of the Net scene.
What, then, is Java? Java is a language for network programming that was developed by Sun Microsystems. It's already in widespread use for creating animated Web pages. However, this is only the start. The Java language and environment are rich enough to support entirely new kinds of applications, like dynamically extensible browsers. There has been talk about new kinds of computer platforms (Java terminals or Java pads) that download all their software over the network. In the coming years, we'll see what Java is capable of doing; fancy Web pages are fun and interesting, but they certainly aren't the end of the story. If Java is successful (and that isn't a foregone conclusion), it could change the way we think about computing in fundamental ways.
This ebook sets out to give you a head start on a lot of Java fundamentals. Exploring Java attempts to live up to its name by mapping out the Java language, its class libraries, programming techniques, and idioms. We'll dig deep into interesting areas, and at least scratch the surface of the rest. Other titles in the O'Reilly & Associates Java series will pick up where we leave off and provide more comprehensive information on specific areas and applications of Java.
Whenever possible, we'll provide meaningful, realistic examples and avoid simply cataloging features. The examples are simple but hint at what can be done. We won't be developing the next great "killer Internet app" in these pages, but we hope to give you a starting point for many hours of experimentation and tinkering that will lead you to learn more on your own.

Ebook - Java Fundamental Classes Reference

By Mark Grand and Jonathan Knudsen
This java ebook is a reference manual for the fundamental classes in the Java programming environment; it covers version 1.1 of the Java API. We've defined fundamental classes to mean those classes in the Java Development Kit (JDK) that every Java programmer is likely to need, minus the classes that comprise the Abstract Window Toolkit (AWT). (The classes in the AWT are covered by a companion volume, the Java AWT Reference, from O'Reilly & Associates.) Thus, this ebook covers the classes in the java.lang and java.io packages, among others, and is essential for the practicing Java programmer.
This is an exciting time in the development of Java. Version 1.1 introduces a massive amount of infrastructure that more than doubles the size of the core Java APIs. This new infrastructure provides many new facilities, such as:
  • 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.

Read More/get this free ebook

Java Fundamental Classes Reference (Java Series)

Java AWT Reference

By John Zukowski
The Abstract Window Tookit (AWT) provides the user interface for Java programs. Unless you want to construct your own GUI or use a crude text-only interface, the AWT provides the tools you will use to communicate with the user. Although we are beginning to see some other APIs for building user interfaces, like Netscape's IFC (Internet Foundation Classes), those alternative APIs will not be in widespread use for some time, and some will be platform specific. Likewise, we are beginning to see automated tools for building GUIs in Java; Sun's JavaBeans effort promises to make such tools much more widespread. (In fact, the biggest changes in Java 1.1 prepare the way for using the various AWT components as JavaBeans.) However, even with automated tools and JavaBeans in the future, an in-depth knowledge of AWT is essential for the practicing Java programmer.
The major problem facing Java developers these days is that AWT is a moving target. Java 1.0.2 is being replaced by Java 1.1, with many significant new features. Java 1.1 was released on February 18, 1997, but it isn't clear how long it will take for 1.1 to be accepted in the market. The problem facing developers is not just learning about the new features and changes in Java 1.1, but also knowing when they can afford to use these new features in their code. In practice, this boils down to one question: when will Netscape Navigator support Java 1.1? Rumor has it that the answer is "as soon as possible"--and we all hope this rumor is correct. But given the realities of maintaining a very complex piece of software, and the fact that Netscape is currently in the beta process for Navigator 4.0, there's a possibility that "as soon as possible" and "soon" aren't the same thing. In other words, you should expect Java 1.0.2 to stick around for a while, especially since Web users won't all replace their browsers as soon as Navigator has 1.1 support.
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.
Sun has done a good job of maintaining compatibility between versions: 1.0 code runs under Java 1.1, with very few exceptions. All of the 1.0 examples in this book have been tested under Java 1.1. However, Java 1.1--and particularly, AWT 1.1--offer many advantages over older releases. If nothing else, I hope this book convinces you that you should be looking forward to the day when you can forget about writing code for Java 1.0.2.

Java Language Reference

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 complete description of all of the constructs in the language, so that programmers can write Java programs that function exactly as expected. This book is not meant to teach you the Java language, although you could probably use it for that purpose if you are already fluent in a number of other programming languages.
This is an exciting time in the development of Java. Version 1.1 is a huge new release that more than doubles the size of the core Java APIs. Fortunately, the Java language itself contains relatively few changes for Java 1.1. The new features of the language are significant, however, both in terms of the useful functionality and the elegance they add to the language. This book covers all of the new language constructs in Java 1.1. Here's a quick list of the new features:
  • 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

Read More/get this free ebook

Ebook - Java in a Nut Shell

By David Flanagan
This handbook is a desktop quick reference for Java programmers; it covers version 1.1 of the Java language and API. It also includes introductory and tutorial material for other programmers who want to learn Java. It was written to sit faithfully by your keyboard for easy reference while you program. The wild success of the first edition has shown that this is exactly what Java programmers want, and I've retained the "no fluff" explanations and the to-the-point reference material in this second edition. I hope that new readers will find this book useful, and that old readers will find it even more useful than the last one!


Contents of This Book
This book is divided into five parts:
Part I: Introducing Java
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.
Part II: Introducing Java 1.1
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.
Part III: Programming with the Java 1.1 API
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.
Part IV: Java Language Reference
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.
Part V: API Quick Reference
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

This java Faq site provides various java faq's in core java, advanced java, enterprises java and miscellaneous java programming techniques.
As on july 2007, this java faq and ebook site provides the following java materials for you.
Core Java
  1. Language Fundamentals(147)
  2. Virtual Machine(19)
  3. Classes, Interfaces, & Pkgs(49)
  4. Exceptions(09)
  5. Applets(55)
  6. Abstract Window Toolkit(70)
  7. Events - JDK 1.1 and above(27)
  8. Drawing(38)
  9. Threads(21)
  10. Input, Output(38)
  11. Network(68)
  12. Miscellaneous(28)

Advance Java FAQ

  1. Servlets (12)
  2. JDBC (38)
  3. Swing (15)
  4. RMI (30)
  5. Java Beans(15)
  6. Java IO (10)
  7. Jini (09)
  8. CORBA (04)
  9. Browsers (07)

Read More/get this free ebook

Java Lecture Notes

This java lecture note is a good introductory level java ebook written by Elliotte Rusty Harold. This java materials are being taught by the author at the senior undergraduate and introductory graduate level for computer science majors, and is split into 13, two hour fifteen minute classes plus a final exam.
Following are the course content of this java ebook.
Week 1: Basic Java
Week 2: Procedural Java
Week 3: Introduction to java Objects
Week 4: More java Objects
Midterm
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

This java ebook "Java An Object First Approach" provides a thorough introduction to the production of software artefacts, a process known as software development, using the programming language Java. The ebook is intended for use with readers or students starting their software development education and can also be used at a more advanced level as an Object-Oriented ebook. The author uses a spiral approach to present object-oriented concepts and techniques. The development of a class hierarchy is utilized, stressing a design, build, test cycle. An extensive case study at the conclusion of the book pulls the concepts together.
This java ebook is writen by Fintan Culwin. Following are the topics covered in this java book.
  • 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.

Read More/get this free ebook

A Guide to Java Programming - Bleeding at the Keyboard

"Bleeding at the Keyboard" is a very nice java ebook and a good java guide teaches you modern programming with java. This java ebook is written by Gregory Rawlins.
The following are the topics covered in this java book.
Setting the Stage: object, class, method, program, Java interpreter, inheritance, interface, design pattern.
Introducing the Players: class, variable, value, type, state, behavior, reference value, reference variable, message, statement, method, reference variable, reference value, class, method, and variable naming conventions, declaration statement, boolean variable, int variable, double variable, boolean value, int value, double value, true, false, scope, local variable, global variable,
Behind the Scenes: parameter, method execution, sending a message, type, return, new, assignment statement, operator, operand, main() method, dot operator, variable access, continuation line, comment, void, if, ".", "<=", "==", "/*", "*/", "//".
Character Study: type, value, reference value, reference variable, reference type, boolean type, int type, double type, Class type, null, state, behavior, operator, operand, remainder, expression, boolean expression, int expression, double expression, type casting, (int), (double), (boolean), "+", "-", "*", "/", "%", "&&", "", "!", "<", "<=", ">", ">=", "==", "!=".
Stage Direction: state, behavior, type, encapsulation, variable initialization, constructor, signature, constant naming convention, class variable, class method, if-else, this, import, private, public, final, static, main().
All Together Now: while, for, blocks, scope, increment operator, decrement operator, "++", "--", declaring variables in for loops, encapsulation, method overloading, method signature, String, string concatentation, operator overloading, arrays, array operator, "[]", packages, package access, package naming convention, package, the unnamed package.
It Takes All Types: subclass, superclass, extends, super(), overriding methods, overloading methods, class Object, the equals() method, the toString() method, String, protected, interface, interface naming convention, implements, abstract method, abstract class.
What's in a Name?: subtype, supertype, this, this(), super, super(), "([type name])", instanceof, reference casting, upcast, downcast.
Think Like an Object: encapsulation, final method, final class, private constructor.
Let the Games Begin: threads, Runnable, sleep(), exceptions, try, catch, Graphics, Component, paint().

Java Version- How to Think Like a Computer Scientist - Fourth Edition

This is a very nice java programming ebook and you can think like a java scientist.
By Allen B. Downey
This is the fourth edition of a book I started writing in 1999, when I was teaching at Colby College. I had taught an introductory computer science class using the Java programming language, but I had not found a textbook I was happy with. For one thing, they were all too big! There was no way my students would read 800 pages of dense, technical material, even if I wanted them to. And I didn't want them to. Most of the material was too specific---details about Java and its libraries that would be obsolete by the end of the semester, and that obscured the material I really wanted to get to.
The other problem I found was that the introduction to object oriented programming was too abrupt. Many students who were otherwise doing well just hit a wall when we got to objects, whether we did it at the beginning, middle or end.
So I started writing. I wrote a chapter a day for 13 days, and on the 14th day I edited. Then I sent it to be photocopied and bound. When I handed it out on the first day of class, I told the students that they would be expected to read one chapter a week. In other words, they would read it seven times slower than I wrote it.

A Gentle Introduction to Java Programming

by Andrew Cumming
This is an interactive java programming tutorial. You can run java programs and can verify the output of the programs. This java training covers the following topics in detail.
  • 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

Accumulating variables, recursion, function composition.

Read More/Start Java Training

Essentials of the Java Programming Language, Part 1

By Monica Pawlan
If you are new to programming in the Java language, have some experience with other languages, and are familiar with things like displaying text or graphics or performing simple calculations, this tutorial could be for you. It walks through how to use the Java 2 Platform software to create and run three common types of programs written for the Java platform—applications, applets, and servlets.
You will learn how applications, applets, and servlets are similar and different, how to build a basic user interface that handles simple end user input, how to read data from and write data to files and databases, and how to send and receive data over the network. This tutorial is not comprehensive, but instead takes you on a straight and uncomplicated path through the more common programming features available in the Java platform.
A Word About the Java Platform
The Java platform consists of the Java application programming interfaces (APIs) and the Java virtual machine (JVM).
Java APIs are libraries of compiled code that you can use in your programs. They let you add ready-made and customizable functionality to save you programming time.
The simple program in this lesson uses a Java API to print a line of text to the console. The console printing capability is provided in the API ready for you to use; you supply the text to be printed.
Java programs are run (or interpreted) by another program called the Java VM. If you are familiar with Visual Basic or another interpreted language, this concept is probably familiar to you. Rather than running directly on the native operating system, the program is interpreted by the Java VM for the native operating system. This means that any computer system with the Java VM installed can run Java programs regardless of the computer system on which the applications were originally developed.
For example, a Java program developed on a Personal Computer (PC) with the Windows NT operating system should run equally well without modification on a Sun Ultra workstation with the Solaris operating system, and vice versa.

Java Au Naturel - Guide to Object Oriented Design - Java 2 with Swing

by Dr. William C. Jones, Jr.
Software development with an object-oriented approach is the fundamental subject of this book. Java is a programming language used to create the animations you see when you browse the web. Of all the programming languages whose use is wide-spread, Java is the best for learning and doing object-oriented software development. That is why Java is used in this computer science book.
Chapter One explains the details of compiling and executing a program. It introduces much of the vocabulary you need. It establishes the framework for Java programs. And it gives an overview of the book with a look at other contexts where objects are used to perform useful tasks. This is a foretaste of what is to come, so you are not expected to fully understand at this point everything it mentions.
Chapter Two introduces a quite different software context. The software provided to you defines objects that control the basic physical actions of electronic equipment. Your job is to develop additional software that puts these basic actions together in combinations that perform tasks that the purchaser of the electronic equipment finds useful. You learn to use inheritance in this new context. Then you see how to have objects select between two courses of action depending on the circumstances. You also learn a simple method of diagramming the relationships among classes of objects. It is a widely used technique that is part of the Unified Modeling Language (UML). The UML is the industry standard for modeling software.
Chapter Three shows you how to teach objects to repeat a sequence of actions many times until a task is accomplished. This ability leads to more complex programs, so we discuss a reliable process for developing the logic to solve a problem and translate it into a Java program. This is the one chapter that does not introduce a new major context for developing software.
Chapter Four switches to the context of game-playing programs. In this context, you learn how to build objects "from scratch", specifying what they know as well as what they can do. By this time you can write interesting and useful programs using only the standard library of objects that comes with every Java installation. The game-playing software interacts with the outside world through the keyboard and screen rather than via signals to and from electronic equipment or to a drawing surface.
Chapter Five completes the presentation of basic language features you need for working with objects in your programs. At this point you can construct a complete string-based simulation of the electronic equipment you worked with in earlier chapters. A case study on networks lets you see the interaction of all of the object-oriented concepts and most of the language features applied in another context. The situation that the networking material describes is key to many important real-life problems. The analysis and solution of some of these problems can be quite complex; it is the subject of more advanced courses in computer science. But the discussion here is quite elementary.
Chapter Six expands your arsenal of basic types of values to include characters and numbers with decimal points (heretofore you only had the whole-number and true-false kinds of values). It also gives you a full set of methods for dealing with strings of characters. These language features are introduced in the context of software to schedule work orders at a car repair shop using the Model/View/Controller approach and several kinds of objects at once.
Chapter Seven gives you the tools you need to work with large masses of data. This is in the context of software to handle a database of people working for a particular company. A re-implementation of a simulation of the electronic-equipment software from Chapters Two and Three helps you solidify your understanding of the key concept of arrays.
The first seven chapters present the features of Java most frequently used in this book, together with a moderate number of examples. Many of the concepts, especially the various uses of arrays, cannot be learned well enough without a great deal of practice. The remaining eleven chapters give you that practice. Their primary purpose is to (a) improve your understanding of principles and techniques of software design and development, and (b) reinforce the concepts in the basic first seven chapters.
Each of the next twelve chapters presents a different software design and development situation. The emphasis is on techniques for creating quality software...

Introduction to Programming Using Java, Fifth Edition

By David J. Eck

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...........

Read More/get this free ebook

Introduction to Computer Science using Java

By Bradley Kjell
These notes cover most of a beginning course in computer science using Java. They assume no background in programming. They are written to supplement a textbook or to be used alone. They provide discussion and simple examples of the important topics in programming. You can learn quite a lot about Java by going through these notes (and by running and playing with the programs, as discussed in chapter 7.) But to get a thorough grounding in the language you should also study a text book and write many programs on your own. Try to do one or two of the suggested programming exercises per chapter.
For maximum benefit, go though these notes interactively, thinking about and answering the question at the bottom of each page. There are about 15 pages per chapter. If you spend about 3 minutes per page each chapter will take about 45 minutes; much more, if you copy and run some of the programs. If you are a beginning programmer, plan on spending more than a month with this.
These notes assume that you have the Java Development Kit (JDK) version 1.1 or later from Sun (http://www.javasoft.com) and a simple text editor such as NotePad. For more about these notes check the frequently asked questions.

Thinking in Java, 3rd ed. Revision 4.0

By Bruce Eckel
The releases of the Java JDK are numbered 1.0, 1.1, 1.2, 1.3, and for this book, 1.4. Although these version numbers are still in the “ones,” the standard way to refer to any version of the language that is JDK 1.2 or greater is to call it “Java 2.” This indicates the very significant changes between “old Java”—which had many warts that I complained about in the first edition of this book—and this more modern and improved version of the language, which has far fewer warts and many additions and nice designs.
This book is written for Java 2, in particular JDK 1.4 (much of the code will not compile with earlier versions, and the build system will complain and stop if you try). I have the great luxury of getting rid of all the old stuff and writing to only the new, improved language, because the old information still exists in the earlier editions, on the Web, and on the CD ROM. Also, because anyone can freely download the JDK from java.sun.com, it means that by writing to JDK 1.4, I’m not imposing a financial hardship on anyone by forcing them to upgrade.
Previous versions of Java were slow in coming out for Linux (see www.Linux.org), but that seems to have been fixed, and new versions are released for Linux at the same time as for other platforms—now even the Macintosh is starting to keep up with more recent versions of Java. Linux is a very important development in conjunction with Java, because it is quickly becoming the most important server platform out there—fast, reliable, robust, secure, well-maintained, and free, it’s a true revolution in the history of computing (I don’t think we’ve ever seen all of those features in any tool before). And Java has found a very important niche in server-side programming in the form of Servlets and JavaServer Pages (JSPs), technologies that are huge improvements over the traditional Common Gateway Interface (CGI) programming (these and related topics are covered in Thinking in Enterprise Java).

1000 Java Tips

By Alexandre Patchine
One thousand Java Tips is 856 pages of A4 format of Java tips, advises and solutions from real daily Java experience. Quite often updated (330, 500, 850 and finally 1000 Java Tips), this e-book becomes more and more useful for Java developers with 2-6 years experience in this area. Questions are not from simple usual FAQs. They are especially good for those who look for Java job interview questions: both for those who hire and who look for Java jobs.
1000 java tips e-book will help you to understand java much better and be well prepared for your java certification examination. This e-book is made of questions and answers.

JDiff - An HTML Report of API Differences

JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared. This is very useful for describing exactly what has changed between two releases of a product. Only the API (Application Programming Interface) of each version is compared. It does not compare what the source code does when executed.
JDiff is a Javadoc doclet which emits an HTML report of all the packages, classes, methods, and so on, which are different (the "diff" part) when two Java APIs are compared. Great for reporting what has changed between two releases of your product.
  • 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

Here are the API specifications for key Java technologies and platforms, including Java 2 Platform, Standard Edition (J2SE), J2SE optional packages, Java 2 Platform, Enterprise Edition (J2EE), Java 2 Platform, Micro Edition (J2ME), XML, and others.
Below is a list of technologies that have API specifications:
Standard Edition
  • 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

Read More/get this free ebook

The Java Course

By by Allen B. Downey
This edition of the eBook "Java Course" is based on the well-known book by Allen B. Downey, "How to Think Like a Computer Scientist". The main reason for rearranging the original material was to provide the book not only as a printable copy (i.e. as a PDF file) but also as an indexed and easy-to-navigate electronic book which is available both online and offline. In addition, we focused on enhancing the accessibility of the texts by improving the index, by splitting the chapters into managable (and readable) parts, and by adding lots of "see also" hints and cross links.
Finally, we decided to publish this eBook as an MS Windows HTML Help file offering the same navigation structure as the Web-based version. We hope that this service makes it easier for many beginners to learn how to program under Java.
Contents
  • 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

Read More/get this free ebook

JDK 1.4 Tutorial

The JDK 1.4 release of the Java programming language from Sun Microsystems represents a substantial step in Java’s progress. Some of the new features are packages that have been in use for some time but have not yet been part of the core Java platform; other features are completely new.
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.
Thus, this book should be considered a by-example companion to the comprehensive documentation. As you peruse the chapter descriptions that follow, you may notice that this book does not rigorously cover all topics. I consider a number of topics too broad to be covered in any useful way in a book of this kind; such topics generally need their own book. These include CORBA (including the new Portable Object Adapter (POA) Object Request Broker (ORB)), XML, the Java Cryptography Extension (JCE), and the Java Authentication and Authorization Service (JAAS).
At the time this book was being prepared, it did not seem possible to acquire a driver that supported enough JDBC 3.0 features to make testing possible. Rather than write from a position of ignorance, and include possibly spurious code listings, I decided not to include a chapter on this important topic.
Sadly, the Generics (parameterized types) feature was, in the end, not included with JDK 1.4 as originally promised. This controversial addition to the language looks like it will be included in JDK 1.5 for sure, and you can download an early-access version of it from Sun. However, since it requires a change to the compiler, it can’t really be said to be a part of JDK 1.4 and so is not discussed in this book.

Sun Java Tutorials

The Java Tutorials are practical guides for programmers who want to use the Java programming language to create applications. They include hundreds of complete, working examples, and dozens of lessons. Groups of related lessons are organized into "trails".
  • 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.
Specialized Trails and Lessons
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.
Read More/get this free ebook

Free ebook - Java Object-oriented Program Design and Software Engineering

By Dave Goddeau

This free ebook entitiled "Java Object-oriented Program Design and Software Engineering" is enriched with 21 lecture notes i.e.
  • 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.

Read More/get this free ebook

Free java ebook - Introduction to Java OOA/OOD for Web Applications

By Alvin J. Alexander

This ebook entitiled Introduction to Java OOA/OOD for Web Applications covers object oriented software development, java programming language basic to advanced, java Standard libraries and Java server side programming.

Contents

Day 1: Object-Oriented Software Development


  • 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



Day 2: The Java Programming Language


  • 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



Day 3: Standard Libraries & Server-side Programming


  • 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
Day 4: Databases, Best Practices, and Final Project
  • 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

By David Schmidt, Kansas State University
This free ebook entitiled "Programming Principles in Java: Architectures and Interfaces" covers computers and programming, Simple Java Applications, Java Arithmetic and Variables, Java Input, Output, and State, Java Component Structure: Method and Class Building, Java Control Structure: Conditional Statements, Java Patterns of Repetition: Iteration and Recursion, Java Data Structure: Arrays, Java Programming to Interfaces, Java Graphical User Interfaces and Event-Driven Programming, Java Text and File Processing, etc. There was once a chapter on data structures, but it desperately needs rewriting.
Chapter 1: Computers and Programming 1
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
Chapter 2: Simple Java Applications 20
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
Chapter 3: Arithmetic and Variables 56
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
Chapter 4: Input, Output, and State 107
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
Chapter 5: Component Structure: Method and Class Building 157
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
Chapter 6: Control Structure: Conditional Statements 229
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
Chapter 7: Patterns of Repetition: Iteration and Recursion 304
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
Chapter 8: Data Structure: Arrays 391
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
Chapter 9: Programming to Interfaces 483
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
Chapter 10: Graphical User Interfaces and Event-Driven Programming 564
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
Chapter 11: Text and File Processing 680
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 I:Java Language Definition 724
Appendix II:Types and Subtypes 741
Appendix III:Class Diagrams 744
Index 748

Popular Posts