Originally posted by Sadashiv Borkar:
Please Tell whats going wrong...........?for my previous query...
Originally posted by Sadashiv Borkar:
package myA;
public class A
{
protected void Test()
{
System.out.println("Inside the Test function of class A");
}
}
package myB;
import myA.*;
public class B extends A
{
public static void main(String args[])
{
B b = new B(); ///check this.....
b.Test();
}
}
The above code works fine ....concentrate on check this line and see below...
import myA.*;
public class B extends A
{
public static void main(String args[])
{
A b = new B(); ///check this.....
b.Test();
}
}
If u see that I have just changed the left hand side of check this satement to "A".
Now if i try to compile the above code it gives me a compilation error saying that the method Test is a protected method hence cannot be accessed......
but if u see carefully u will find that the address is of type "B" hence according to me it should work fine......
Iam confused at this stage that why does it give a compilation error.....
Can anyone clearly explain what happens......
Thanx in advance..........
bye
Originally posted by daizhengyuan:
Hi,
I want to access oracle 8 database with JDBC of Java,but I always fail.I think I can't install oracle 8 correctly,Becuse I use the item"net8 easy configer" to test the instalnation,the result is error.Now,I want to know:
(1)How can I install oracle 8(version 8.0.4)for my java?
(2)where I can download free driver for the oracle?
(3) which sub-protocol , OCI or thin,should I use for the JDBC?
(4)which part of oracle ,oracle8,oracle client and oracle enterprise should I install?
I will appreciate you if you reply me as soon as possible.
Jason