Page 261 - IT-802_class_12
P. 261
if(ch>=’A’ && ch<=’z’)
ch1 = (char)(ch+32);
else
if(ch>=’a’ && ch<=’z’)
{
ch1 = (char)(ch-32);
}
else
{
ch1=ch;
}
newstr=newstr+ch1;
}
System.out.println(“Old String : “+str);
System.out.println(“Converted string: “+newstr);
}
}
3.15 dataBaSE connEctIvItY
This section will teach you how to link a MySQL database with a Java program and retrieve the results of a SQL query you
ran on the database. With NetBeans, we can connect directly to a MySQL server, making it simple to connect a database
to a Java program.
3.15.1 Connecting to the MySQL Server in NetBeans
First of all, we need to configure NetBeans to register and connect a MySQL Server. To do this, follow the steps given
below:
Fundamentals of Java Programming 259

