naren

Greenhorn
+ Follow
since Aug 06, 2000
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 naren

Originally posted by Sadashiv Borkar:
Please Tell whats going wrong...........?for my previous query...


hello,
In this case u didn't mentioned any packages.so by default all are in a single package.so it is compiling fine.
23 years ago

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


hi sadashiv,
in java the functions or methods are invoked depending upon the reference type being accessed.in ur case the reference is 'A' and as test() in 'A' is protected,it can't be invoked.
23 years ago
hi,
applet-applet communication can be done using appletcontext.
u can go through java.sun.com site for further clarification
23 years ago

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


hi jasen,
did u know that oracle8 needs to be installed on winNT,it doesnt work on win 95 or 98.Secondly u have to use Net protocol/all java driver for connecting to database .it can be downloaded from java.sun.com site.u may load any thing oracle client or server and any edition,professional or enterprise.
hello,
i dont think the component will retain the color of immediate container.for any component,u need to explicitly set the color.
Also as panel is invisible component,and panel is a container for
placing components,the components will not inherit the color.
23 years ago
hi,
to call a pl/sql stored procedure in java,u have to use callable statements. syntax is something like this:
CallableStatement cs=Connection.prepareCall("{call procedurename(?,?)}");
then u have to pass dynamiclly the parameters to the procedure using cs.setXXX(),where xxx is the datatype u declared.
To get output u have to register the outparameter .
23 years ago
hi,
in java i dont think u got any function for this.u got some thing like ceil(),floor(),round() of math package which gives the largest number .ie Math.ceil(123.245)==124;Math.floor(123.245)==123;math.round(123.245)=123; But u dont have any function as such which can clear ur doubt.
23 years ago
hi ,
difference between SMTP and POP3 is ,
SMTP is simple mail transfer protocol,which is used for sending mails through mail server.in order to receive the mails,we use other protocol,called postoffice protocol.for sending protocol through java,we had to import "java.sun.net.smtp.*; for sending and receiving mails means,use javamail ,download it from "java.sun.com" products.
23 years ago
santoo,both abstract class and interface defines null body in its methods,which need to be implemented in other classes.
Abstract classes are used,when ever u need variable declaration,methods.
Interface doesn't allow to declare the variables.

23 years ago