on an airplane written in 97, though may not be too outdated since java is a pretty solid language book is mixed up, went from index to chapter 28 to chapter 2...maybe it will be more interesting this way. reference types - pointers....value types - ints, floats, etc. "primitive types are always passed by value; arrays and objects are always passed by reference." "Because objects are passed by reference, two different variables may refer to the same object: Button p, q; p = new Button(); // p refers to a Button object. q = p; // q refers to the same Button. p.setLabel("Ok"); // A change to the object through p... String s = q.getLabel(); // ...is also visible through q. // s now contains "Ok." " yeesssss...."java has no pointers" "There are two reasons for these restrictions: ● Pointers are a notorious source of bugs. Eliminating them simplifies the language and eliminates many potential bugs. ● Pointers and pointer arithmetic could be used to sidestep Java's run-time checks and security mechanisms. Removing pointers allows Java to provide the security guarantees that it does. " "Arrays are manipulated by reference.● They are dynamically created with new.● They are automatically garbage collected when no longer referred to.●" want to try something abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz tiny httpd is a simple http server AWT - abstract windowing toolkit...for gui's also, it's platform independent i just read, awt has been superseeded by swing awt also has imageproducers for processing images written with code java made for writting applets on web but now is used for programming everything strings are easy: "String quote = "To be or not to be"; " in java, arrays know their own length try { out.write(b); } catch (IOException e) { System.out.println("Output Error"); } finally { out.close(); "Java uses a "sandbox" security model to ensure that applets cannot cause security problems. The idea is that an applet can do whatever it wants within the constraints of its sandbox, but that nothing done inside the sandbox has any consequences outside of the sandbox." java.util.zip contains compression classes page 430 starts AWT reference - now obsolete jjava's gui handling makes it way easier to make programs that will run on every platform. return true return true return true return true return true return true return true return true return true return true hello world: "class HelloWorld { // Declare class HelloWorld public static void main(String argv[]) { System.out.println("Hello World!"); } } " final is like const in c++ this book is out of order.... subclasses "extend", interfaces "implement" the only way to keep track of dates in computer is to have a starting point (e/g/ jan 1st 1970) this is the worst book ever. here's why: the pdf is out of order /////////////////////// java has ways of translating program strings based on reigon === in java does not mean equality it checks for identity "Java data types fall into two categories. Primitive types represent simple values that have built-in functionality in the language; they are fixed elements like literal constants and numeric expressions. Reference types (or class types) include objects and arrays; they are called reference types because they are passed "by reference" as I'll explain shortly." "Java's roots are in embedded systems--software that runs inside specialized devices like hand-held computers, cellular phones, and fancy toasters" "There's been a lot of talk about the "millenium bug" lately. This refers to the expected failure of software in the year 2000, when programs that use two digits to represent years interpret "00" as 1900 instead of 2000. Java is mostly safe from this error. The Date class has no specific field for year and is thus immune to this problem. The only time you'll run into this error in Java is when you use a DateFormat to parse a date string with a two-digit year. Two-digit years are automatically prefixed with 19. My advice is to always use a four-digit year when you expect to parse a date string." oops : "This book is not meant to be read from cover to cover, " vectors are just really cool arrays. "The garbage-collection process in Java normally runs continuously in the background in a low-priority thread. In an environment that has nonpreemptive thread scheduling, you may want to run the Java virtual machine with the -noasyncgc option to ensure the best possible response from your application. The -noasyncgc option prevents garbage collection from running in the background. In this case, the only time that garbage collection occurs automatically is when the Java virtual machine runs out of memory. Since this can cause unexpected pauses in a program, you should try to avoid the problem by running the garbage collector at convenient or appropriate times by calling System.gc(). " FILTERED OUTPUTSTREAM "public static void arraycopy(Object src, int src_position, Object dst, int dst_position, int length) Parameters src The source array. src_position An index into the source array. dst The destination array. dst_position An index into the destination array. length The number of elements to be copied. " the java.lang.reflect class in to look internally at program structure....possibly a way to write AI? class called big integer, all arithmetic has to be done by class methods. "it must have been moonglow" "I know that few people read a book like this from beginning to end, but if you want to, it's possible." "Java is one of 13,000 islands that makes up Indonesia, whose capital is Jakarta (see Figure 0.1). It is home to about 120 million people with an area about 50,000 square miles. While on the island, you can hear traditional music such as gamelan or angklung. The island also has a dangerous volcano named Merapi, which makes up part of the Pacific "Ring of Fire." In 1891, fossils from Pithecanthropus erectus, better known as "Java man" (homo javanensis) were discovered on the island by Eugene Dubois. " "public final static int FOCUS_FIRST public final static int FOCUS_LAST The FOCUS_FIRST and FOCUS_LAST constants hold the endpoints of the range of identifiers for FocusEvent types. public final static int FOCUS_GAINED The FOCUS_GAINED constant identifies focus events that occur because a component gains input focus. The FocusListener.focusGained() interface method handles this event. public final static int FOCUS_LOST The FOCUS_LOST constant identifies focus events that occur because a component loses input focus. The FocusListener.focusLost() interface method handles this event. " the awt class has a lot of methods forimage processing but i have a feeling there are probably better easier ones now.. javac is the java compile program good way to count how many classes are "instantiated": class Foo { ... static int fooCount = 0; Foo() { fooCount++; } ... } static makes a variable a "class variable"...thats how the counter works, otherwise there is a new variable for each time its called FOR AN APPLICATION TO RUN, ONE CLASS MUST HAVE A METHOD CALLED MAIN(). for applets: init() The init() method is called to initialize the applet. Most initialization of an applet is done here instead of in a constructor because the constructor may be called before the hosting program is ready to provide all of the services needed for initialization. start() The start() method is called in a separate thread to tell the applet to start doing whatever it is supposed to do. paint() The paint() method is called at unpredictable times to draw the applet onto the screen. stop() The stop() method is called to tell the applet to stop doing whatever it does. destroy() The destroy() method is called to tell the applet to release any resources that it holds. "The Object class is the ultimate superclass of all other classes in Java."