nitude gupta

Ranch Hand
+ Follow
since Sep 04, 2008
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 nitude gupta

Hi ,
I am fetching data from database which is in the format
0007256231<3spaces>004
but when I display it on screen it is modified to
0007256231<1space>004
why it is happening I am not ableto get.
I am using backing bean as policySearchBean.java

this is the piece of code which is displaying it on screen
12 years ago
JSF
Hi All,
I need to create multiple list using five elements in a list
e.g

list A = 101,102,103,104,105

now i need to create 5 list which look like

list A1= 101,102,103,104
list A2= 101,102,103,105
list A3=101,102,104,105
list A4=101,102,104,103
list A5=101,103,104,105 and so......on all permutation n combination
13 years ago
hey Thanks for the prompt reply...It worked!!!
13 years ago
Hi DERE!!
I am writing a Java code in which I am trying to use property file where I have defined connection details and few constants

here is my code


CheckListReportComponent.java
########################

connection.properties
########################


when I use strURL or strUser etc in getMyConnection() function I start getting err "Driver not Found!!!"
where as when I prnt these properties in main...using SOP I m able to do that..
Please suggest where I m missing n why these property are not available inside other functions

TIA......


13 years ago
DBConnection.java
This file is defined @ E:\Java\Test_java


Test.java
This file is defined @ E:\Java\Test_java



and I have defined connection.properties @ pkg "E:\Java\Test_java\properties"
I am compiling it using
E:\Java\Test_java>javac *.java

for executing this I am using

E:\Java\Test_java>java Java.Test_java.Test

and getting this err:

Exception in thread "main" java.lang.NoClassDefFoundError: Java/Test_java/Test
Caused by: java.lang.ClassNotFoundException: Java.Test_java.Test
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: Java.Test_java.Test. Program will exit.
13 years ago
Hi All,
I m getting this exception when I m trying to execute my java program
Exception in thread "main" java.lang.NoClassDefFoundError: Test (wrong name: Java/Te
st_java/Test)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: Test. Program will exit.

The problem is not with classpath I suppose as i am able to run a simple "Hello world" program...
any help on this....
TIA...
13 years ago
Congratulations sudipto your sucess story was really inspiring...
even I am plannin to giv second time but not able to gather the couarge...Thank you
14 years ago
Thank you for the encouraging words.... i think motivation will be needed to gather the courage to giv it again
I want to clear it and with good % .How to start working upon lacking points!!!
I have a brief idea that I am worst at API content and generics..
15 years ago
Hi ,
I am not upset nither happy....
how to go next abt it
15 years ago
Hi ,
I am giving SCJP1.5
I am seriously facing problem in calculating objects which will be garbage collected.
Lets take an example from Devaka's examulator


Question is how many objects are eligible for garbbbage collection after Line1?
P.S:I have typed the code they may be some grammatical mistake please ignore.

My problem is how to make map of objects to be garbbage collected

I am really bugged.
Please help!!!

Hi
I have both 1.5 and 1.6 installed on my system.
I checked on console all programs were executed using 1.6 using command javac -version
But I want to run using 1.5...Is there any explicit cmd thorugh which I can change version at compile time..

Thank you in advance
15 years ago
Hi your explaination was quite good but I am still confued abt all this



I suppose this is the current scenario
can you explain for each option how it is wrong because according to me the code should compile fine
no
Thank you....I am really not getting the concept I think

it has options


didn't get the explaination given that

F is correct. The problem here is in Group's add() method—it should have been
add(Person), since the class extends HashSet<Person>.



can you also explain why it works when we change add(object ) to add(Person)

i have question that isn't the return statement of add() method wrong is it possible we can use super anywhere else rather than first statement in a menthod
In Q10 of selftest in K & B which is


which has options


ans is B
I am not getting that why for option C to be correct we needs munch(Plant p) method instead of munch(Grass x)
also if there is any material which explains about type generic,I am really lost....n I suppose its an imp topic for exam
Just a query in continuation to previous discussion, Suppose if try is having return statement and catch and finally don't.

An exception is thrown before code reaches return of try,will it still execute return of try