Question 1)a) Draw a flowchart to show process of building and running java application programs.
b) Describe primitive data types.
c) Are the code fragments given below valid? If yes, what is the output after execution ? If no, why not?
(i) Class MyThread implements Runnable
{
static public void main(string args[])
{
Thread t= new thread(new MyThread());
t.start();
}
Public void run (string msg)
{System.out.println(“In run method”+msg);
}
}
(ii) Public class Base{
Int i=1;
Base( ){i++;}
Void m( ){System.out.println(“i=”+i );}
Public static void main (string arg[ ])
{Base b = new Derived( );
b.m( );
}
}
Class Derived extends Base{
Public void m ( ){System.out.println(“i =” +I );}
Void Derived ( ){i ++ ;}
}
Question 2)a) What is JDBC ? Describe executeQuery( ) & executeUpdate( ) methods
b) Using two dimensional array, write a program to show following output.
0 1 2 3 4
5 6 7 8 9
10 11 12 13 14
15 16 17 18 19