Professional Documents
Culture Documents
Simple
Secure
Dynamic
Desktop Client
Miscellaneous Features
Core XML Support
Supplementary Character Support
JDBC RowSets
Class file
containing Windows Pentium PC system
Bytecodes Class Loader
Bytecode Pentium
Class Loader Verifier machine level
Bytecode JIT compiler instructions
verifier
JIT compiler
To run it:
c:\java Example
Type method_name(arguments ){
body
}…..
} //class ends.
Final Methods
final methods cannot be overridden
Methods declared as static are implicitly final
Also methods declared private are implicitly final
Pooja str
str1
© Copyright aurionPro Solutions Ltd.
StringBuffer Class
Peer class of String class that represents fixed length,
immutable char sequence
StringBuffer represents growable and writeable
character sequence
Insertions at particular positions are possible through
this class
DownCasting
String s1 = (String) o;
String s2 = (Serializable) s
Example
javac –d . Balance.java
javac –d E:\JavaAss\MyAss Balance.java
Same class Y Y Y Y
Package P1
Class A
Package P2
Exception Error
Example:
public void passgrade(int a, int total) {
if (a > total)
throw new ArithmeticException();
}
java.util.Properties is a platform-independent
generalization of the DOS SET environment, or the
Windows *.INI files. In Java, even each object could
have its own list of properties. A program can
determine if an entry is missing in the property file
and provide a default to using it its place
FileOutputStream(String filepath)
FileOutputStream(File fileobj)
ByteArrayInputStream(byte array[])
access can be r or rw
void seek( long newPos);
Terminates
Dead
Container
(abstract)
Panel Window
Menu Component
(abstract)
Menubar MenuItem
Menu CheckboxMenuItem
PopupMenu
AWT Event
Key Mouse
Event Event
© Copyright aurionPro Solutions Ltd.
Event sources,classes &
interfaces
Event Type Event Source Listener registration Event listener
and removal methods interface
provided by the implemented by
source a listener
ActionEvent Button addActionListener ActionListener
List removeActionListener
MenuItem
TextField
Adjustment Scrollbar addAdjustmentListener AdjustmentListene
Event removeAdjustmentListe r
ner
ItemEvent Choice addItemListener ItemListener
Checkbox removeItemListener
CheckboxMenuItm
List
TextEvent TextArea addTextListener TextListener
TextField removeTextListener
Lightweight Components
Components are not dependent on native peers to render
themselves. Instead, they use simplified graphics
primitives to paint themselves on the screen and can
even allow portions to be transparent
JContainer
(abstract)
JPanel JWindow
Model Component
Interface
ButtonModel Jbutton, JCheckBox, JRadioButton,
JMenuItem
BoundedRangeMod JProgressBar, JScrollBar, JSlider
el
Document JTextField, JTextArea, JTextPane etc.
Scroll
Provide automatic scrolling facility
Horizontal and vertical headers are possible
Oracle SQL
DB 2
Database Server
JDBC
HTTP,RMI,CORBA
Application
Propriety server (JAVA) Business
protocol logic
Database JDBC
server
Propriety protocal
DBMS
Connection ResultSet
Interfaces
in java.sql
DatabaseMetaData ResultSetMetaData
Driver
Connection
call.registerOutParameter(1,Types.INTEGER);
call.execute();
int val=call.getInt(1);
System.out.println(“There are ” +val + “ employees”);
try {
con.setAutoCommit(false);
// perform transactions
con.commit()
con.setAutoCommit(true);
} catch (SQLException e) {
con .rollback() ;}
© Copyright aurionPro Solutions Ltd.
Collections Framework
in Java