Balaguru Krish

Greenhorn
+ Follow
since Sep 23, 2005
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Balaguru Krish

In order to know the column name which is the primary key , we can use
USER_CONS_COLUMNS table.

Example:

SELECT COLUMN_NAME FROM USER_CONS_COLUMNS WHERE CONSTRAINT_NAME = 'EMP_PRIMARY_KEY'

Originally posted by Shobana Sukumar:
which table can i refer to find the primary key of a table?i need a tablename to be refered other than the desc command as i hav to access the table name's primary key value from a code....



In order to know the primary keys of a table,we have a table called USER_CONSTRAINTS.

Example :

select * from user_constraints where table_name = 'EMP' and constraint_type = 'P'
For iterating a resultset , why there is a need for a connection object after the resultset is being returned by executeQuery(sqlQuery) ?

ResultSet rs = stmt.executeQuery("select * from emp");
con.close();
while( rs.next() )
{

}

It throws an Exception .
Why?
I do'nt want the browser to remember the values.
Can we do it progrmmatically ?
I have a set of text fields in a html page.After entering values in the text fields , i submit it . After doing certain operations , The page is logged out.

If we go to the same page again , if we enter starting with alphabet which we previously entered , the value entered previously is shown.

Similar to the username being retained in the case of rediff or yahoo pages.

Do we have any solution for this progrmmatically?
[ November 22, 2005: Message edited by: Bear Bibeault ]
What is the difference between Comparable and Comparator interfaces?
At what situation these interfaces are used?
18 years ago
I am preparing for SCJP and i have the following doubt.

Consider the following code :

public class Test
{
public static void main(String [] args)
{
SuperTest st = new SubTest();
st.testMethod(10);
}
}

class SuperTest
{
public void testMethod(int a)
{
System.out.println("\n Test Method in Super Test Class ");
}
}

class SubTest extends SuperTest
{
public void testMethod(final int a)
{
System.out.println("\n Test Method in SubTest Class ");
}
}

Whether the testMethod in SuperTest is overloaded or overriden in SubTest ?
Sorry For Previous Reply, I did not add my reply to it.

Problem lies with statement -> this(f);

The problem is we cannot refer to an instance while invoking explicit
constructor.

Hence it must be replaced with this(<constant-value> ;


Originally posted by bhadule bhadule:
Hello Ranchies,
can anybody plz explain me why this bellow code is not getting compile?


public class Test19 {
float f;
Test19(){
this(f);
f = 3;
}
Test19(float f){
System.out.println(f);
}
public static void main(String args[]) {
Test19 t = new Test19();
}
}


Regards
Hrushi

Originally posted by bhadule bhadule:
Hello Ranchies,
can anybody plz explain me why this bellow code is not getting compile?


public class Test19 {
float f;
Test19(){
this(f);
f = 3;
}
Test19(float f){
System.out.println(f);
}
public static void main(String args[]) {
Test19 t = new Test19();
}
}


Regards
Hrushi