sasamysql.blogspot.com
SASA Mysql: Copy Table in a MySQL Database
http://sasamysql.blogspot.com/2010/05/copy-table-in-mysql-database.html
Monday, May 24, 2010. Copy Table in a MySQL Database. In this section, you will learn to copy one table to another in a same MySQL database. Note: Both tables have the same field and its data type.]. Syntax for copy tables:. Here is code of program:. Import java.sql.*;. Public static void main(String[] args) {. System.out.println("Copy data from one table. To another in a database! Connection conn = null;. String url = "jdbc:mysql:/ localhost:3306/";. String dbName = "jdbc4";. String userName = "root";.
sasamysql.blogspot.com
SASA Mysql: Prepared Statement Set Big Decimal
http://sasamysql.blogspot.com/2010/05/prepared-statement-set-big-decimal.html
Monday, May 24, 2010. Prepared Statement Set Big Decimal. Otherwise it shows "SQL statement is not executed! This is the constructor of java.sql.BigDecimal class that takes one string type argument and translates it into a BigDecimal. SetBigDecimal( int index, BigDecimal big);. Above method takes integer type index number another is BigDecimal types number and sets an arguments to the given java.math.BigDecimal value. Here is the code of program:. Import java.sql.*;. Import java.math.*;. Set Time by usin...
sasamysql.blogspot.com
SASA Mysql: Deleting Records using the Prepared Statement
http://sasamysql.blogspot.com/2010/05/deleting-records-using-prepared.html
Monday, May 24, 2010. Deleting Records using the Prepared Statement. Here is the code of program:. Import java.sql.*;. Public static void main(String[] args) {. System.out.println("Delete records example using prepared statement! Connection con = null;. ClassforName("com.mysql.jdbc.Driver");. Con = DriverManager.getConnection. Jdbc:mysql:/ localhost:3306/jdbctutorial","root","root");. String sql = "DELETE FROM movies where year made =? PreparedStatement prest = con.prepareStatement(sql);. Deleting Record...
sasajava.blogspot.com
SASA JAVA: April 2010
http://sasajava.blogspot.com/2010_04_01_archive.html
Tuesday, April 27, 2010. Java play wav file. Complete source code below will show you, how to play wav file in java. Import java.io.File;. Import javax.sound.sampled.AudioFormat;. Import javax.sound.sampled.AudioInputStream;. Import javax.sound.sampled.AudioSystem;. Import javax.sound.sampled.DataLine;. Import javax.sound.sampled.SourceDataLine;. Public static void main(String[]args). String filename="Star-Wars-4118.wav";. Int EXTERNAL BUFFER SIZE = 524288;. File soundFile = new File(filename);. Closes t...
sasajava.blogspot.com
SASA JAVA: March 2010
http://sasajava.blogspot.com/2010_03_01_archive.html
Sunday, March 14, 2010. Monday, March 8, 2010. Local inner class method. Sometimes we can declare a class inside a method such type of classes are called method local. The main purpose of method local inner classes is to define method specific functionality. The scope of method local inner classes is the scope of the method where it is declared. This is the mostly rarely used type of inner classes. Public void sum(int I,int j){. System.out.println(i J);. Inner i=new Inner();. Public static void main(){.
sasajava.blogspot.com
SASA JAVA: April 2009
http://sasajava.blogspot.com/2009_04_01_archive.html
Monday, April 6, 2009. 160; In this diagram PERSON is the base class, and OLD PERSON, YOUNG PERSON both are the child classes to PERSON and YOUNG PERSON have the three more childs. 160; So we can call PERSON class data members and member function from YOUNG PERSON and OLD PERSON classes. Subscribe to: Posts (Atom). Follow me on twitter. Indian Stocks update (BSE). Astronomy Picture of the Day.
sasajava.blogspot.com
SASA JAVA: Sample Map Function in JAVA (Part of Map Reduce)
http://sasajava.blogspot.com/2014/11/sample-map-function-in-java.html
Thursday, November 6, 2014. Sample Map Function in JAVA (Part of Map Reduce). Map function splitting the data into chunks. Package com.mapreduce.devx;. Import java.io.BufferedReader;. Import java.io.InputStreamReader;. Import java.net.URI;. Import java.util.StringTokenizer;. Import org.apache.commons.logging.Log;. Import org.apache.commons.logging.LogFactory;. Import org.apache.hadoop.conf.Configuration;. Import org.apache.hadoop.fs.FileSystem;. Import org.apache.hadoop.fs.Path;. Path file path;. Check v...
sasajava.blogspot.com
SASA JAVA: May 2009
http://sasajava.blogspot.com/2009_05_01_archive.html
Thursday, May 28, 2009. Setting the CLASSPATH System Variable. To display the current CLASSPATH variable, use these commands in Windows and Unix (Bourne shell): . To delete the current contents of the CLASSPATH variable, use these commands: . Unset CLASSPATH; export CLASSPATH. To set the CLASSPATH variable, use these commands (for example): . C: set CLASSPATH=C: users george java classes. CLASSPATH=/home/george/java/classes; export CLASSPATH. Subscribe to: Posts (Atom). Follow me on twitter.
sasajava.blogspot.com
SASA JAVA: May 2010
http://sasajava.blogspot.com/2010_05_01_archive.html
Saturday, May 22, 2010. SCJP 1.4 Objectives. Section 1: Declarations and Access Control. Write code that declares, constructs and initializes arrays of any base type using any of the permitted forms both for declaration and for initialization. For a given class, determine if a default constructor will be created and if so state the prototype of that constructor. Identify legal return types for any method given the declarations of all related methods in this or parent classes. Recognize the effect of an e...
sasajava.blogspot.com
SASA JAVA: Border Layout
http://sasajava.blogspot.com/2010/07/border-layout.html
Thursday, July 8, 2010. BorderLayout divides the container into five Geographical regions namely. North,South,East,West and Center.This is very commonly used Lyout. Manager.You can add at most one component to each region of a BorderLayout. To put more than one component in a section, put them in a JPanel (with its own layout),. Then add that panel to the border layout. If nothing is added to a region then neighbouring regions go on to fill up space. New BorderLayout(int hgap,int vgap);. DropDown Menu or...