Anil Kumardvg

Greenhorn
+ Follow
since May 21, 2007
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 Anil Kumardvg

i want write one jsp in that option menu should be load from database using optionscollection and formbean.
can any one tell me the steps or if possible provide me the link for example

thank you
16 years ago
thank you Spritzler

Inserting Record
Done
Hibernate: insert into CONTACT(FIRSTNAME,LASTNAME,EMAIL,ID) values(?,?,?,?)

when i run the program its showing like this, but records are not inserting to the database and where do i find that log4j.xml and what is the use of that.
hi friends i am trying to run the program given in roseindia.net
I am getting error, I have gone through with some mailing list for same error but i am not able to solve it, can any one help me.

log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment).
log4j:WARN Please initialize the log4j system properly.
Inserting Record
Done
Hibernate: insert into CONTACT(FIRSTNAME,LASTNAME,EMAIL,ID) values(?,?,?,?)
Can any one answer to my question " What is the reason behind choosing the name java "
16 years ago
You are telling all main methods are in separate class know.But they are in one java file.
when you save the file you have to mention the class name which main method has to execute first.compiler first look at that class file for main method then execute the body of the main() method.
you can call the main method of the other classes from main() method currently exucuting. you are using static main method so you can call main method by using class name.

go throw this example
save file as abc.java

Three class file will generate which ever you call at the run time that will execute first

class abc
{
String a[]={"a","b"};
public static void main(String args[])
{
String a[]={"a","b"};
System.out.println("hi");
xyx.main(a);
}
}

class xyx
{
public static void main(String args[]){
System.out.println("hi");

}
}

class rrr {
public static void main(String args[]){
System.out.println("hi");
}
}
[ May 25, 2007: Message edited by: Anil Kumardvg ]
16 years ago
Hi Sidhu,

try to read java your self its easy, In the begining I also searched many institute.Now I have started to read Head first its very nice book go throgh with this book.If you got any doubt post it in forum.Discuss with your friends, its more than enough
16 years ago
Hi Ron,
In one class create instance variable,setter and getter method for that variable in setter method you take the command line argument and assign it to the variable. in getter method return the variable.
Create other class in that class call the getter method you will get the value
16 years ago
thanks for your reply
that means numOfHitts = numOfHitts + 1 takes more operations first it adds the 1 to numOfHitts and then stores it in numOfHitts

Is it correct
16 years ago
Hi,
I am studying head first java in that he has given (page:105)
numOfHits++ is the same as saying numOfHits = numOfHitts + 1, except slightly more efficient.

I am not getting how its more efficient ? both are same know

thanks
regards
Anil
16 years ago
Is it possible to return multiple values from method. How can we return different data type values from one method.
16 years ago
thanks a lot
16 years ago
thank you Rajan for your reply,I have still doubt please don't mind.
for example
class Emp{
int empId;
void getEmp(){
//body
}
}
if we create 10 object for above class then each object have different value of instance variable of empId,what abt all object have same getEmp() method or each object have there own method, if all objects refers same method, then how its going to proceed with each instance variable.
16 years ago
Hi,

1) Is there memory required for methods, and when v create object, each object is going to have there own methods or for one class there will be one method all object will refer that.

thanks
16 years ago