karan roy

Greenhorn
+ Follow
since Dec 09, 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 karan roy

How do we run JSP and Servlet projects through Weblogic server.
where do we store servlets and jsp examples for the weblogic server
22 years ago
like we have jdbc-odbc for java can u please tell me the connectivity with sql for c++.
what is the procedure and if possible ,a small example code for inserting or updating data.
also the sites where this info might be available.

thank you
Karan Roy
what do we mean by Aggregation?
23 years ago
hi
there is definitely more than just a simple package statement.
first of all the packlage statement should be the topmost statenment of your source code.
whatever is the name of the package,u have to include your class file in the same directory.
e.g Package aa;
this has to be included in the directory aa.
any subpackages of the same have to be included within this folder as subfolders .
one more important aspect is that whenever u make a package and want to access the same,u have to set the classpath of the directory in which that package has been declared.
23 years ago
hi
i don't think u need the paint and the repaint methods to display anything in the display area.u can do the same using the init().if your status bar information is not being displayed b'coz of the applet started info.,it means u r not using the showStatus() properly.
the showStatus()expects a Strinmg in the arguement.
try this out this might work
String h="hello";
showStatus(h);
23 years ago
constructors are basically methods which are invoked automatically once an instance of the class is created.
if we do not make a constructor of a class ,the default constructor is automatically created by the compiler.
a default constructor is the one which takes no arguements
there are some imp. points of constructors-
1)when no construtors are created,a default one is automatically created by the compiler.
2)default constructors are not inherited.if u want to inherit the parameterized constructor too,use the super keyword in the
constructor of the sub class.
3)constructors can be overloaded.
4)if there are two constructors in the same class and one constructor calls another one,it can do so using the this. keyword.
5)constructors are automatically invoked when the instance of the class is created.
that is what i know about them-hope it helps
23 years ago
hi
i am making an applet in which i have made a label(an animated label)and have made 4 buttons
top
left
right
bottom
now,using event handling ,i want this label to move likewise when i click on these buttons.
just tell me a method with the help of which i can move a label
inside an applet
23 years ago
i am giving the answer of the 4th one.
u r absolutely right when u say that .length()is the method to find the length-but the length of what??
it is used to find the length of a String.
to find the length of an array,we always use .length
w/out any parentheses.
it is true that a float has a low precision but i am not too sure about the double b'coz this is where double scores over float-accuracy
whenever the literal values are too big or too small the answer in a float datatype might lose accuracy but i think this is not the same in case of double
double shows accurate values.
this is got nothing to do with casting
whenever we call the t.start() fn,after this line ,the compiler goes back to the method where the constructor was called from
and therefore the main thread starts executing.
and after the main thread,the child thread starts executing(output varies depending on the o.s).
if u call directly the run method only the compiler will move onto that method and start reding it w/out going to the main thread .
i am nor having anyproblem using jdbcin an application
however if i want some data to bedisplayed on an applet,eg the textField of an applet
AccessControlException is raised.
-(my coding is correct)
why does this kind of an exception gets thrown
hi
whatever i have got of your query,i am replying that.
we will take the 2nd part first.
//instance member
//-this is a comment entry in java which is totally ignored by the compiler .
in the book this has been given for u to understand that it is an instance variable
//-is a one line comment entry
multiple lines comment entries are written thru
/*
this would
be ignored by the
compiler
*/
i hope that was ur query
now coming to the first part
when we say
print p=new print();
this can be written in 2 steps as well
1)print p;
2)p=new print();
the first line just creates a variable p of class type print.
here as we know a class is nothing but a user defined data type
so p is a variable of type print.here it is not referring to anything.it is just a variable pointing to null.
in the 2nd line
p=new print();
now an object has been created and the reference p is referring to that object of type print.
it is important to understand that there is a difference b/w a reference and an object.
whenever an object is created,the constructor of the specific class is called and memory is allocated.
the reference just points to that object and whenever we use any fn. or variable of that class ,we do that by using the reference of that object.
i hope i have given a valid reply.
ranch hands ,please correct me if i am wrong or incomplete
23 years ago
hi all
how important are the native methods in the real world application.since the portability and security are affected by
the same i have a feeling they do not serve much purpose.
please let me know