SCDJWS-Part 1(XML)

Index

*XML is a self describing data format which can be used in the communication between the client and server.

*An element name must begin with a letter/underscore. It must never start with “xml”(reserved for xml–>1.0spec).

*CDATA section allows you to mark a section of text, as literal so that it will not be parsed for tags & symbols. Those will be considered as strings.

*xmlns = “some uri” –> which confirms to the URI specification RFC 2396. defined by IETF.

*URI can take many forms the most common one is URL.

*The URI used for the xml namespace should be unique to that markup language and doesn’t have to point to a actual resource/document.

*In XML speak a prefix combined with an element name is called a “Qname”.

SCDJWS3

*XML parsers & other tools use xml namespace to process, sort and search xml elements in a document according to their “Qnames”.

*DTD fails to address data typing(weak typing). [empty, any, element content, mixed content].

*Complex types describe how elements are organized and nested.

*Simple types are the primitive data types contained by elements and attributes.

*XML schema spec uses 44 simple types called built in types

SCDJWS1

*Xerces -J, supports schema validation while ‘crimson’ not support.

*Jdom, dom4j and Xom are non standard xml java api.

*All simple and complex types are ultimately derived from “anytype”.

*When an element declares that it is of a particular type, it must specify both the name space & the name of that type exactly as the type declares them.

*default value for ‘minOccurs’ & ‘maxOccurs’ is “1”.

*’maxOccurs’ can be unbounded.

*’default’ attribute is used only when “use” attribute is optional.

SCDJWS2

Index

Java -Part 13

Java – Part 12    Index

*Recap in image for Java – Part 12.

oknotok

*There are 3 ways to represent integer numbers.

  1. decimal (base 10)
  2. octal (base 8) ==> 0_ _
  3. hexa decimal (base 16) ==> 0x_ _

*You can have upto 21 digits in an octal number, not including the leading zero.

*You are allowed upto 16 digits in a hexa decimal number, not including the prefix “0x” or the optional suffix extension “”.

*All 3 integer literals (octal, hexa, deci) are defined as int by default & but they may also be specified as long by placing a suffix or “L” or “l” after the numbers.

*You can also type in the unicode value of the character using the unicode notation of prefixing the value with ‘\u’ . eg., ==> char letterN = ‘\u004E’; –>N

assignment

*The compound assignment operator(+=) lets you to add the value of b without putting in an explicit cast.

*Infact +=, -=, *=, /= will put an implicit cast.

*Array elements are always, always, always are given default values, regardless of where the array itself is declared or instantiated.

*Local variables, including primitive always, always must be initialized before you attempt to use them.

AnnonymousArray

*Remember that, you don’t specify size when using anonymous array creation.

*Initialization block runs when the class first loaded(static initialization block) or when an instance is created(an instance initialization block).

*Instance initialization block runs just after the call to super() in a constructor.

*Remember none of the Wrapper classes widen from one to another.

*The heap is the part of memory where java objects live & its the one and only part of memory that is in anyway involved in the garbage collection.

*when comparing a character with a character or a character with a number java will use the unicode value of the character as the numerical value of comparison.

*’==’ look at the value in the variable in other words bit pattern.

*’instanceof’ operator is used for object reference variable only.

*expressions are evaluated from left to right.

*If either of the operand is a String the ‘+’ operator becomes a String concatenation operator. If both operands are numbers ‘+’ is addition operator.

*The ‘||’ and ‘&&’  works only on the boolean operands. eg., ==> if(5 && 6) ==>compile error.

*A switch expression must evaluate to a  char, byte, short, int or as of java 5 an enum, & variables that can be promoted automatically(implicit cast).

*The case constant must be compile time constant.

*In ‘For’ loop, you can’t use multiple tests separated by commas, even though the other two parts of a for loop can have multiple parts.

*’break’ => execution jumps immediately to the 1st statement after the loop.

*’return’ => execution jumps immediately back to the calling method.

*’continue’ statements must be inside a loop and ‘break’ statements must be inside a loop or in a switch.

*Generally an application won’t be able to recover from an error, so you are n’t required to handle them.

*The wrapper objects can’t be considered as constants in switch statement.

*In general ‘RegEx’ search runs from left to right and once a sources character has been used in a match it can’t be reused.

*The equals() method for the Integer wrapper will only return true if the 2 primitive types and 2 values are equal.

*Its legal but not the correct way of coding using transient variables in hashcode() & equals() method.

*An inner class instance shares with an instance of the outer class. Even the inner classes can access ‘private’ members of the outer class. But the inner class won’t be accessible in the normal way.

*Regular inner class can’t have static declarations of any kind. The only way you can access the inner class is through a live instance of the outer class.

*Modifiers applied to inner classes.

  • final
  • abstract
  • public, private, protected
  • static( turns in to static nested class)
  • strictfp

*A method local inner class can be instantiated only within the method where the inner class is defined.

*A method local inner class object can’t  use the local variables of the method the inner class in.  If the local variables are invoked as final them we can access the local variables.

innerclasses

*2 types of threads.

  • daemon
  • user

*The JVM will exit, if all the user threads are completed, but this is not the case of daemon.

*’Thread’ job always run from a run() method. 2 threads executing the same method at the same time will use different copies of the local variables, they can’t bother each other.

wait(), notify(), notifyAll() must be called from within a synchronized context. A thread can’t invoke a wait/notify method on an object unless its owns that object lock.

*When you specify a path for a JAR file you must include the name of the JAR at the end of the path.

*You can do static imports on static objects, references, constants & static methods.

 

Java – Part 12    Index

Java – Part 12

Java – Part 11 Index    Java – Part 13
*Memory Allocation(primitive/object/array)

memoryallocation

*Object meta data => consists of the information about the object.

  1.  Class Pointer => a pointer to the class
  2.   Flags => state of object hash code etc.,
  3.   Locks => Synchronization locks.

*Array Object => this is also a kind of object, but its having one more additional meta data info i.e., the size of the array.

  1. class pointer
  2. flags
  3. locks
  4. size

*For single valued primitive data types arrays are expensive in terms of memory.

*The data in the string object is the array of characters.

*Runtime Data Areas.

  1. Heap
    1. Method area
      1. Type information
      2. Constant pool
      3. Field information
      4. Method information
      5. Class variables
      6. Reference to class loader
      7. Method table
    2. PC registers
    3. Java stacks
    4. Native method stacks

*Decimal integer => 0->9

*Octal integer => 0->7 ==>prefixed with ‘0’

*Hexadecimal integer =>0->F(A-10,B-11,C-12,D-13,E-14,F-15) ==>prefixed with ox/oX

*Real constants may not have digits before & after the decimal points(.)

*215.65  ==> 2.1565@2  ==> 2.1565E2   ==>Mantissa @ Exponent

*Mantissa =>real/integer

*Exponent =>real optional +/-

*Embeded whitespace is not allowed in any numeric constant.

*Escape Sequences (total 8)==> b, f, n, r, t, \, “, /

*We can make integers long by appending “l” or “L” to the end of the numbers.

*Floating point are by default double we can make it float by appending “F” or “f

*Floating point support “NAN“.

*All keywords are lower type strings.

*3 types of variables

  1. Instance variables
  2. Class variables
  3.  Local variables

*Operators

  1. Arithematic operators
  2. Relational operators
  3. Logical operators
  4. Assignment operators
  5. Increment/decrement operators
  6. Bitwise operators
  7. Conditional operators
  8. Special operators.

*Bitwise operators may not be applied to float & double.

*Bitwise, Bitwise shift, one’s complement operators work only on “integer” types.

*Access Specifiers.

  1. public
  2. private
  3. protected.

*Method arguments treated as local variable & will be having only one specifier “final”

*class with abstract and without abstract methods ==>ok

*class without abstract and with abstract methods ==>not ok.

*synchronized, native applied only to the methods.

*strictfp applied only to the class, methods[IEEE754] =>not dependent on platform.

*Constructors can’t be static, final and abstract.

*char assigned to any integer type larger than “short”.

*transient and volatile can be applied only to instance variables.

*Enum can only be declared public/default like inner class.

*In Switch, case constant must be compile time constant.

*You need to have only one “test expression” in the for loop.

*continue should be used in loop only.

*Force exit of a program

  1. break
  2. return
  3. System.exit()
  4. Exception

*Labelled continue & break statements must be inside the loop that has the same label name otherwise the code won’t compile.

*The Thread is considered to be alive after its call to start() method.

ThreadLive

*We can’t tell one thread to block another thread.

*suspend(), resume(), stop() ==>deprecated, better not to use.

*yield() method won’t ever cause a Thread to go to the waiting/sleeping/blocking state, yield() method causes the thread to go from running to runnable.

*wait(), notify(), notifyAll() must be called from within a synchronized context.

*You can’t put access specifiers to local variables, only you can put final for local variables.

*variables can be

  • final
  • transient
  • abstract
  • static
  • synchronized
  • native
  • private
  • public
  • protected

*Classes can be

  • public
  • abstract
  • final
  • strictfp

*Methods can be

  • public
  • protected
  • private
  • final
  • static
  • synchronized

*Instance variables

  • public
  • protected
  • private
  • final
  • transient
  • static
  • volatile

*static can be given to methods, variables, top level nested classes.

*You can’t specify the size when declaring the anonymous array.

*Divide by zero(0)

  • /0 => Integers ->runtime exception
  • /0 => Floats => +ve/-ve infinite.

*remainder operator(%) result in ArithmeticException if right operand is zero

*Identifiers must start with a letter a currency character($) or a connecting character(_)

*There is no limit to the number of characters an identifier can contain. Identifiers are case sensitive.

*All interface methods are implicitly public & abstract.

*All variables defined within the interfaces are public static final.

*Interface methods must not be static.

*Interface methods can’t be

  • final
  • static
  • strictfp
  • native

*Outside the package can’t use a super class reference to access a protected member. For subclass outside the package the protected member can be accessed only through inheritance.

*It is never legal to include the size of the array in the declaration eg., int [5] scores;

*abstract methods can’t be

  • final
  • private

*final reference variable must be initialized before the constructor completes

*static members doesn’t have the direct access to non-static members.

*An enum declared outside the classes can’t be marked

  • static
  • final
  • abstract
  • private
  • protected

*octal , hexa , decimal and binary representations.

decimalhexa

Java – Part 11 Index    Java – Part 13

Java Part 11

Java-Part 10 Index Java-Part12
*Applets are not executed by console based java runtime interpreter, rather they are executed by web browser/applet viewer.

*output to the applet is performed by various AWT methods. The applet will be executed by java enabled web browser, when it sees the “” tag in the html file. Applet class provides all necessary methods for applet execution such as starting and stopping.

AppletClass

*An Applet waits until an event occurs. The AWT notifies the applet about an event by calling an event handler that has been provided by the applet. Once this happens the applet must take appropriate action, & return the control to AWT.

*”drawString()” method doesn’t recognize the new line characters. As a general rule an applet writes to its window only when its “update()” or “paint()” method is called by AWT.

*One fundamental architectural constraint in applet is it should repeatedly transfer the control to AWT. Whenever an applet is need to be updated, it calls “repaint()” method of AWT & “repaint()”  method execute the “update() method. In turn “update()” calls the “paint()” method.

*AppletContext is an interface, let you get the information regarding applet context.

*The most common windows are those derived from “Panel“, which is used by applets & those are derived from “Frame” which creates a standard window.

*Component => is an abstract class that encapsulates all of the attributes of visual component.

*Container => It is a sub class of Component, it has additional methods that allow other component objects to be nested within it.

*Controls are the components that allows a user to interact with your application in various ways. Except for labels which are passive controls, all controls generate events when they are accepted by user.

*Layout

  1. FlowLayout
  2. BorderLayout
  3. CardLayout

*There are 3 common operations that occur when you work with images.

  1. creating an image
  2. loading an image
  3. displaying an image.

*Image class doesn’t have enough information about its environment to create the proper data format for the screen. “Component” class in Java.awt. has a factory method called “createImage()” that is used to create image objects.

*The other way to obtain an image is to load one. To do this use the “getImage()”  method defined by the applet class. Once you have an image you can display it by using “drawImage()” which is a member of “Graphics” class.

*ImageObserver interface is implemented by all AWT components.  An ImageObserver is an object that can monitor the image while it loads. Applet implementation of the ImageObserver interface calls “paint()” everytime more image data arrives.

*Use of an offscreen image to reduce flicker is called double buffering because the screen is considered a buffer of pixel & the offscreen image is an second buffer.

*MediaTracker is an object that will check the status of an images in parallel. You should use MediaTracker when loading groups of images.

*ImageConsumer is an abstract interface for objects that want to take pixel data from images & supply it as another kind of data.

Java-Part 10 Index Java-Part12

Java-Part 10

Java-Part 9 Index   Java – Part 11

*The I/P is a low level routing protocol that breaks data into small packets & sends them to a address across a network.

*The TCP is a higher level protocol that manages to robustly string together these packets, sorting & re transmitting them as necessary to reliably transmit your data.

*The UDP sits next to TCP  & can be used directly to support fast, connection less unreliable transport of packets.

*A port is a numbered socket on a particular machine.

*A server is allowed to accept multiple client connected to same port number. Although each session is unique.

*A proxy server speaks the client side of a protocol to another server.

*The internet address is a number that uniquely identifies each computer on the net.

*IPV4[ 32 bit values], IPV6[48 bit values].

*InetAddress[C] => It is used to encapsulate with the numerical I/P address & domain name for that address. You can interact with this class by using the name of I/P host. InetAddress has no visible constructors. To create this object we have to use the factory methods.

*A factory methods merely a convention where by static methods in a class return an instance of that class.

*On the internet it is common to use the same name for different machine

*TCP/IP socket are used to implement reliable, bidirectional persistent point to point stream based connections between hosts on the internet.

*A Socket can be used to connect java I/O system to other programs that may reside either on the local machine or an any other machine on the internet.

*There are 2 types of TCP sockets.

  1. ServerSocket
  2. Socket

*The ServerSocket class designed to be a listener which waits for client to connect before doing anything.

*The Socket class is designed to connect to ServerSocket & initiates protocol exchanges. The creation of Socket object implicitly establishes a connection between the client and server.

*There are no methods or constructors that explicitly exposes the details of establishing a connection.

*URL[C] => The web is a loose connection of higher level protocols & file formats all unified in a web browser.

*UrlConnection[C] => It is used to get the information on the internet. We create this object using open connection() method.

*TCP/IP Server Socket =>When you create a ServerSocket, it will register itself with the system as having an interest in client connections.

*ServerSocket has a method called accept() which is a blocking call that will wait for a client to initiate communications & then return with normal socket that is used for communication with the client.

*Java implements datagrams on top of the UDP protocols by using 2 classes.

  1. DataGramPacket
  2. DataGramSocket

*TCP/IP reservers lower 1024 ports for specific protocols

  • 21 – FTP
  • 23 – Telnet
  • 25 – Email
  • 79 – Finger
  • 80 – Http
  • 119 – NetNews

Java-Part 9 Index   Java – Part 11

Java-Part 9

Java-Part 8 Index   Java-Part 10

*ResourceBundle, ListResourceBundle, PropertyResourceBundle classes aid in the Internalization(I18N) of large programs.

*PropertyPermission which allows you to grant a read/write permission to a system property.

*The java collection framework standardizes the way in which groups of objects are handled by your programs.

* Algorithms operate on collections and are defined as static methods within the “Collection” class.

*Although “maps” are not the collections, but they are truly integrated with the collections.

*Collection[I]=> This is the foundation upon which the collection framework is built.

*List[I]=>It extends Collection, it stores the sequence of elements. Elements can be inserted or accessed by their position in the list using zero(0) based index. A list may contain duplicate elements.

*Set[I]=>It extends Collection, it doesn’t allow duplicates.

*SortedSet[I]=>It extends Set & declares the set sorted in ascending order

*Iterator[I]=> when we want to use we have to follow the following steps.

  • Setup loop that makes a call to “hasNext()“.
  • Within the loop use “next()”.

*RandomAccess[I] => It contains no members, It is implemented by “ArrayList” legacy “Vector” class.

* ArrayList[C]=> It is a dynamic array that can grow as needed. You can call ensureCapacity() method to increase the capacity of ArrayList manually.

*LinkedList[C] => It provides a linked list data structure.

*HasSet[C]=> It creates the collection that uses a hash table for storage. The hashcode() is then used as the index at which the data associated with the key stored. The default fill ratio is 7.5.  It doesn’t guarantee the order of its elements.

*LinkedHashSet[C]=> It maintains the linked list of entries in the set, in order in which they were inserted.

*TreeSet[C]=> Objects are stored in ascending order.

*Map[I]=>Map is an object that stores association between key & values. Both key & values are objects. “NULL” is not allowed in the Map. Collection views are the means by which maps are integrated in to the collection framework.

*To do we “keySet()”                                                                                                                                                  “entrySet()” =>It returns objects type “Map.Entry”

*SortedMap[I] =>It allows very efficient manipulations of sub maps.

*Map.Entry[I]=> This is an inner class for Map.

*AbstractMap is the super class for all concrete implementations of Map.

*WeakHashMap implements the map that uses weak keys which allows an element in a map to be garbage collected when its key is unused.

*HashMap[C] => It uses HashTable to implement Map interface.

*TreeMap[C] => Elements will be stored in ascending key order

*LinkedHashMap[C] => It maintains the linked list of entries in the Map.

*IdentityHashMap[C] =>It is similar to the HashMap except it uses reference equality when comparing elements.

*Collection Algorithms => The collection framework defines several algorithms that can be applied to collections & maps. The algorithms are defined as static methods within the Collection class. None of the collection implementations are synchronized. In order to use we have to use synchronized methods. It defines the following static variables.

EMPTY_SET, EMPTY_LIST, EMPTY_MAP.

*Arrays =>It is not part of collections, the fill the gap between arrays & collections.

*Legacy Classes & Interfaces => None of the collections classes are synchronized, but all legacy classes are synchronized.

  1. Enumeration[I]
  2. Vector[C] => it is similar to the ArrayList
  3. Stack[C]=>It is a sub class of vector that implements a standard last-in-first out stack.
  4. Dictionary[C]
  5. HashTable[C] => Similar to HashMap but is synchronized. HashTable can only stores the elements that override the “hashcode() & equals()”. It doesn’t supports iterators directly.
  6. Properties[C]=> It is the sub class of HashTable. This class is used by many other classes. Both key & values are Strings. One of the most useful aspects of Properties is that the information contained in a Properties object can be easily stored to or loaded from disk.

*StringTokenizer[C] => Parsing is the division of text into a set of discrete parts or tokens, which in a certain sequence can convey a semantic meaning. It is often called as lexer/scanner. It implements the Enumeration interface.

*BitSet[C] => A BitSet class creates a special type of array that holds bit values. It is similar to Vector of bits. All bits are initialized to zero. BitSet implements “Clonable” interface.

*Date[C] => It encapsulates current date & time. It counts from midnight Jan 1, 1970. After Java 2, it implements Comparable interface.  By using this we can’t get the individual values. Date comparison can be done in 3 ways.

  1. Using “getTime()”
  2. Using methods “before(), after(), equals()”
  3. Using “comapreTo()”

*Calendar[C] => The abstract class provides a set of methods that allows you convert a time in milli seconds to number of useful components.

*GegorgianCalendar[C]=>

*TimeZone[C] =>It allows you to work with time zone offsets from GMT

*SimpleTimeZone[C] =>It also computes day light saving time.

*Locale[C] => The Locale class is instantiated to produce objects that each describe geographical or cultural region. It provides to write I18N programs.

*Random[C] => It is the generator of pseudo random numbers.

*Observable[C] => Observable class is used to create sub classes that other parts of your program can observe.

*Currency[C] => This class encapsulates the information regarding Currency.

*A stream is linked to a physical device by the Java I/O system.

*File[C] => File class doesn’t specify how information is retrieved from or stored in files. File supports Comparable interface.

*FileNameFilter[C] => By using this we can limit the number of files returned. It defines only a single method “accept()

*Serialization => Is the process of writing the state of an object to a byte stream. It is needed to implement the RMI. Only an object that implements the Serializable interface can be saved & restored by the serialization facilities. Variables that are declared as transient are not saved by the serialization facilities. static values are also not saved.

*Collections in One Shot=>

collections
Java-Part 8 Index   Java-Part 10

Java-Part 8

Java-Part 7   Index   Java-Part 9
*In java reference variable of the super class can also refer to the sub class.

*Whenever we pass an object to System.out.println(obj), it internally calls “toString()” function of the object class.

*while we are reading from the keyboard using system.in.read, “ctrl+z” returns “-1”.

*A frame is handled using WindowListener interface it contains 7 methods.

*a % b ==>[modulo] is equal to a-(a/b)*b, where a/b is an integer division.

*floating point supports NAN[not a number] =>whenever dividing by “0” or one of the operand is NAN.

*new operator creates an object & returns the reference to that object.

*static members, methods ==> class members, methods.

*WRAPPERS:

  1. Converting primitive numbers to object numbers using “constructors”
  2. Converting object numbers to primitive numbers using “typeValue()” method
  3. Converting numbers to strings using “toString()” method.
  4. Converting String objects to numeric objects using the static method “valueOf()”
  5. Converting numeric string to primitive numbers using parsing methods.

*Interfaces define only abstract methods and final fields.

*The process of reading and writing objects is called object serialization.

*A stream represents the uniform, easy-to-use object oriented interface between program and I/O devices.

*The objects of piped I/P stream & piped O/P stream are connected through the method connect().

*System.in, System.out, System.err=> here in, out & err are static variables.

*HTML =Whenever we press a key, an event will be raised. It returns the ASCII value of the characters typed (window.event.keycode).

*There can’t be any instances of the abstract class. However reference variable of the abstract class are allowed.

*Order of Overriding.

overrideorder

*BufferedReader can be attached to any InputStream.

*Thread

ThreadExtends

*In order to make class B as a thread, using Thread class is not possible because in java its not allowed to extends 2 classes(multiple inheritance is not allowed) at a time.

*Synchronization is the process of making queue mechanism on the threads.

*We can’t declare abstract constructors & abstract static methods.

*We don’t enter the size of an array at the time of declaration.

*To find packages

  1. java runtime systems checks the current folder.
  2. it will search for folders in the class path

*Both String and StringBuffer are the final classes, & both implement “CharSequence” interface.

*Most internet protocols & text file formats use 8 bit ASCII for all text interchange.

Java-Part 7   Index   Java-Part 9

Java-Part 7

JDBC   Index   Java-Part 8
*A variable is an identifier that denotes the storage location, used  to store a data value unlike constants that remain unchanged, during execution of a program, a variable may take different values at different times during program execution.

*We can make integers long by appending the letter “L” or “l” to the end of integer.

*The float type values are single precession numbers, while double type represents the double precession numbers.

*Floating point numbers are treated as double precession quantities. To force them to be in single precession mode we must append them “F” or “f” eg:- 1.23F or 7.5692e5f.

*Even though java char type uses 16 bit to represent uni code character set, the typical format for Strings on the internet uses arrays of 8 bit bytes constructed from ASCII character set.

*equals() method compares the characters inside a String object. The == operator compares 2 object references to see wether they refer to the same instance.

*StringBuffer => String.valueOf() is called for each parameter to obtain its string representation. The result is appended to the StringBuffer object.

*The “void” class has one field “TYPE” which holds the reference to the “class” object for the type void. You don’t create instances of this class.

*Iterator enables you to cycle through a collection, obtaining or removing elements.

*ListIterator extends Iterator enables bidirectional traversal of list & can modify the contents also.

*Map.Entry =>Describes an element (key, value) in a Map. This is inner class of Map.

*RandomAccess is implemented by both ArrayList & Vector.

*The Map.Entry interface enables you to work with a Map entry. Recall that the entryset() method declared by the Map interface returns the set containing the Map entries.

*Each of these Set elements is Map.Entry object.

*Iterator ->next() ->returns element                                                                                           Enumeration->nextElement()->returns generic object reference

*Hastable can only store object that override hashcode() & equals() method that are defined by the Object class.

*StringTokenizer implements the Enumeration interface.

*Most Http servers will append a file named index.html or index.htm to the URL that refer directly to a directory resource.

*for ServerSocket the default client connection is 50.

*In HTML, the schema for HTML would be the HTML language definition itself.

*HTML browsers ignore tags that they don’t understand.

*xmlprologue

*Name spaces provide a way to separate tags into groups using Uniform Resource Identifiers.

*Name spaces can be identified within the prologue of the document.

*Synchronized used only for method level.

*abstract can’t be combined with the following.

  • final
  • strictfp
  • private
  • static
  • synchronized
  • native

keywordsplus

*native applies only to methods, strictfp applies only to class and methods(IEEE754).

*with strictfp you can predict how your floating point will behave regardless of underlying platform the JVM running on.

*A variable can’t be declared as strictfp.

* There is no final objects, only final references. A reference variable holds bits that represent in a platform dependent manner.

*transient can be applied only to instance variables.

*volatile applied only to instance variables.

*the rule is, a static method of a class can’t access a non static(instance) member, method or variable of its own class.

*static methods can’t be overridden.

*Interface methods can’t be

  • final
  • static
  • native
  • strictfp
  • synchronized

*For floating point values, divide by zero return either ‘+infinity’/’-infinity’.

*The result of an unsigned right shift is always positive, regardless of the original sign bit.

*shift operators can only be used on ints.

*Bitwise operator may not be applied to float & double.

*we can’t use ‘-‘ with boolean.

ListSet

*When you are using “Locale” object, you need to specify language code according to the “ISO-639” language code.[Its having 2 letters].

*Inner classes can be

  • final
  • abstract
  • public
  • private
  • protected
  • static

*Method local inner classes can’t be

  • public 
  • private
  • protected
  • static
  • transient

*only abstract & final can apply for method local inner classes.

char
JDBC   Index   Java-Part 8

Acronyms

Index
* LRU = Last Recently Used
* NRU = Not recently Used
* JDBC = Java Database Connectivity
* JVM = Java Virtual Machine
* JNDI = Java Naming and Directory Interface
* WSDL = Web Services Description Language
* SOAP = Simple Object Access Protocol
* UDDI = Universal Description Discovery and Integration
* XML = Extensible Markup Language
* SAML = Security Assertion Markup Language
* SAAJ = SOAP with Attachment api for Java
* SAX = Simple Api for Xml
* DOM = Document Object Model
* JAXP = Java Api for XML Processing
* JAXR = Java Api for Xml Registries
* IETF = Internet Engineering Task Force
* STAX = Streaming Api for Java
* JAXB = Java Architecture for XML Binding
* EJB = Enterprise Java Bean
* HTML = HyperText Markup Language
* URL = Uniform Resource Locator
* URI = Uniform Resource Identifier
* NAN = Not A Number
* I18N = Internationalization
* L10N = Localization
* AWT = Abstract Window Toolkit
Index

Struts

Index

*Struts flow

Browser => Controller Servlet(Action Servlet) => Create or Retrieve form bean => Store the form bean specified scope => call reset() method => populate form bean with requested data => call validate() method

if errors = Forward to Input page

If no errors = execute() method

*ActionServlet can be configured in 2 ways

  1. Extension map (*.do)
  2. Path map (/do/*)

*Struts Actions

  1. org.apache.struts.action.DispatchAction
  2. org.apache.struts.action.ForwardAction
  3. org.apache.struts.action.IncludeAction
  4. org.apache.struts.action.LookupDispatchAction
  5. org.apache.struts.action.MappingDispatchAction
  6. org.apache.struts.action.LocaleAction
  7. org.apache.struts.action.SwitchAction

*Struts Architecture

StrutsArch

*Important tags in struts-config.xml

  1. DataSource
  2. FromBean
  3. action
  4. message-resources
  5. plugin

Index