Posts

22nd Day @ Apex : Project Completion

Hi Readers, Now I have Completed my Project with java and oracle database. Thank you for be with till my whole project completion. Thank you very much

21 Day @ Apex : Connectivity with Oracle

Hi Readers, Now i now about JDBC Lets Connect my Java project with Oracle database, you can also connect with different database systems like MySQL. But here I am using Oracle, you can choose yours process is similar To connect java application with the oracle database, we need to follow 5 following steps. In this example, we are using Oracle 10g as the database. So we need to know following information for the oracle database: Driver class: The driver class for the oracle database is oracle.jdbc.driver.OracleDriver. Connection URL: The connection URL for the oracle10G database is jdbc:oracle:thin:@localhost:1521:xe where jdbc is the API, oracle is the database, thin is the driver, localhost is the server name on which oracle is running, we may also use IP address, 1521 is the port number and XE is the Oracle service name. You may get all these information from the tnsnames.ora file. Username: The default username for the oracle database is system. Password: It is the ...

20th Day @ Apex: JDBC

Image
Hi Readers, I have created my project a bit. I created my whole GUI now I have To Connnect This GUI with database to store information which is given by user. This will be done by JDBC JDBC stands for Java Database Connectivity. JDBC is a Java API to connect and execute the query with the database. It is a part of JavaSE (Java Standard Edition). JDBC API uses JDBC drivers to connect with the database. There are four types of JDBC drivers: JDBC-ODBC Bridge Driver, Native Driver, Network Protocol Driver, and Thin Driver We have discussed the above four drivers in the next chapter. We can use JDBC API to access tabular data stored in any relational database. By the help of JDBC API, we can save, update, delete and fetch data from the database. It is like Open Database Connectivity (ODBC) provided by Microsoft. Why Should We Use JDBC Before JDBC, ODBC API was the database API to connect and execute the query with the database. But, ODBC API uses ODBC driver which is writt...

19th Day @ Apex : SWING

Image
Hi Readers, In Process of developing my  project i have to also learn a new thing about swing. This is something similar to AWT.  But They have their own differences. Java Swing tutorial is a part of Java Foundation Classes (JFC) that is used to create window-based applications. It is built on the top of AWT (Abstract Windowing Toolkit) API and entirely written in java. Unlike AWT, Java Swing provides platform-independent and lightweight components. The javax.swing package provides classes for java swing API such as JButton, JTextField, JTextArea, JRadioButton, JCheckbox, JMenu, JColorChooser etc. There are many differences between java awt and swing that are given below. No. Java AWT Java Swing 1) AWT components are  platform-dependent . Java swing components are  platform-independent . 2) AWT components are  heavyweight . Swing components are  lightweight . 3) AWT  doesn't support pluggable look and feel . Swing  supports plug...

18th Day @ Apex: AWT

Image
Hi Readers, Today I started on My simple project for that i learn About AWT i.e Abstract window toolkit. Java AWT (Abstract Window Toolkit) is an API to develop GUI or window-based applications in java. Java AWT components are platform-dependent i.e. components are displayed according to the view of operating system. AWT is heavyweight i.e. its components are using the resources of OS. The java.awt package provides classes for AWT api such as TextField, Label, TextArea, RadioButton, CheckBox, Choice, List etc. The hierarchy of Java AWT classes are given below. Container The Container is a component in AWT that can contain another components like buttons, textfields, labels etc. The classes that extends Container class are known as container such as Frame, Dialog and Panel. Window The window is the container that have no borders and menu bars. You must use frame, dialog or another window for creating a window. Panel The Panel is the container that doesn't contai...

17th Day @ Apex : Exception Handling in java

Image
Hi Readers, Today I learn about Exception Handling in java The Exception Handling in Java is one of the powerful mechanism to handle the runtime errors so that normal flow of the application can be maintained. The java.lang.Throwable class is the root class of Java Exception hierarchy which is inherited by two subclasses: Exception and Error. A hierarchy of Java Exception classes are given below: There are mainly two types of exceptions: checked and unchecked. Here, an error is considered as the unchecked exception. According to Oracle, there are three types of exceptions: Checked Exception Unchecked Exception Error

16th Day @ Apex : Encapsulation

Image
Hi Readers, Today I learn about an interesting thing about Java, which is encapsulation. Encapsulation in Java Encapsulation in Java is a process of wrapping code and data together into a single unit, for example, a capsule which is mixed of several medicines. encapsulation in java We can create a fully encapsulated class in Java by making all the data members of the class private. Now we can use setter and getter methods to set and get the data in it. The Java Bean class is the example of a fully encapsulated class. Advantage of Encapsulation in Java By providing only a setter or getter method, you can make the class read-only or write-only. In other words, you can skip the getter or setter methods. It provides you the control over the data. Suppose you want to set the value of id which should be greater than 100 only, you can write the logic inside the setter method. You can write the logic not to store the negative numbers in the setter methods. It is a way to ac...