/*
This class check the prime number between 1 to 1000 and write the prime number.
*/
public class PrimeNumber
{
// This method tests whether a given number is prime or not.
public static boolean isPrime ( int num )
{
boolean prime = true;
int limit = (int) Math.sqrt ( num );
for ( int i = 2; i <= limit; i++ )
{
if [...]
The JDBC is used whenever a Java application should communicate with a relational database for which a JDBC driver exists. JDBC is part of the Java platform standard; all visible classes and interfaces used in the JDBC are placed in package Java
Main JDBC classes:
Download the Java connecting with Oracle Code, you have to [...]
Java supports the custom, user defined exception. Java provides the well known and common exception classes and gives freedom for developer to create their own exception classes matching to their specific business logic/role. For example, a user not found exception would be implemented by its own.
Download the Java Source code for creating user custom exceptions
MyException.java [...]
The task is to store different objects of classes in a physically located file on hard disk. For this to store objects and their states (including the values of their data members) we have to make those classes serializeable. Use Standard Java I/O streams FileOutputStream, ObjectOutputStream to write/store to file and FileInputStream, ObjectInputStream streams to [...]
MySQL side-by-side error fixing while Running Instance Configuration Wizard
To install MySQL Server 5.0 in Windows Vista
Disable the UAC in Windows Control Panel->User Accounts (See the screen shot below)
Windows Vista UAC turn off
Run the MySQL setup i.e. Use mysql-essential-5.0.51a-win32.msi
In the final step uncheck “Configure MySQL Server now”
Download and run Resource Hacker http://www.angusj.com/resourcehacker/
Open …\MySQL Server 5.0\bin\MySQLInstanceConfig.exe [...]