yadav mayank

+ Follow
since Jan 12, 2010
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by yadav mayank

Thanks a lot !!
Its working now
Learnt few things... really thanks a lot.
11 years ago
Hi All
I was trying to learn List.
There is a list which is having some values (after gettng it from the DB) like , {ROLE=Developer} , {ROLE=Tech Lead} etc
I am populating a drop down using this list such that these roles come in the drop down.
Currently my drop down has values as {ROLE=Developer} , {ROLE=Tech Lead} etc.

I tried trimming the list after the = sign and before } , but i am getting no such element exception.

I am new to Java and collections framework is so confusing to me.
Can anyone please help me as to where I am doing mistake ?

My code snippet where I am trying to print the contents of the list is :

String s1="{ROLE=lead}";
String s2="{ROLE=dev}";
List l1=new ArrayList();
Iterator it1=l1.iterator();
System.out.println("Printing after = and before }"+(it1.next()).substring((it1.next()).lastIndexOf("=")+1,(it1.next()).lenght()));

11 years ago
Hi All
I have just finished with the theoritical portion of Core Java. have not done enough handson though.
i am planning to write SCJP Plus in the first week of march , is it possible to clear this exam if i devote 2-3 hours of hands on every day.
considering that the SCJP Plus will be having subjective paper as well what else i will have to take care of.
PS: I cant change the date of the exam becuase Sun is prividing free exams to limited people in my company and for that date is fixed.
Thanks a lot friends for patiently replying to all my naieve questions.
Just one final question.
Tell me which of my understanding is true :

1)one java file can have as many classes as we want but only one class can be public and that should have main method also the name of the java file will be the name of the public class ie the class which has main.

2)one java file can have as many classes as we want and also as many public classes as we want and out of these public classes one should hav the "main" and the name of the java file will be the nameof the public class having main ().
12 years ago
thanks frieds
i made Practice public but since my main was in PracticeTest and i was compiling : java Practice , i was getting that error.
my mistake
it should be compiled as : java PracticeTest.

but again i have a query , why should class PublicTest be public?
i made Practice public and compiled and ran using java PracticeTest....isnt it proper?
12 years ago
i just wrote my first program in Java and got that error.
please help , what should i do.

12 years ago