shameem Shek

Greenhorn
+ Follow
since Aug 27, 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 shameem Shek

Hi this below code is compiling successfully but when I try to run I am getting the exception in thread main while running the program.
Please help me anyone thanks in advance..
class Octal
{
public static void main(String [] args)
{
int six = 06; // Equal to decimal 6
int seven = 07; // Equal to decimal 7
int eight = 010; // Equal to decimal 8
int nine = 011; // Equal to decimal 9
System.out.println("six= " +six);
System.out.println("seven = " + seven);
System.out.println("eight = " + eight);
System.out.println("nine = " + nine);
}
}

Exception in thread "main" java.lang.UnsupportedClassVersionError: Octal (Unsupp
orted major.minor version 49.0)

Please help me anyone as early as possible thank you.
Hi This is Shameem..
I have littlebit Confusion with Generics..

1. import java.util.*;
2. class TestGen
3. {
4.public static void main(String[] args)
5.{
6.Queue<Integer> q = new LinkedList<Integer>();
7.q.add(2342);
8.q.add(345);
9.q.add(455);
10.q.add(new String("ishmayel"));
11.q.add(new Double(324));
12.q.add(new StringBuilder("ishmayel"));
13.showAll(q);
14.}
15.public static void showAll(Queue q)
16.{
17. q.add(new Float("ishmayel"));
18. q.add(new Double(324));
19. q.add(new StringBuilder("ishmayel"));
20. while (!q.isEmpty())
21 System.out.print(q.remove()+ " ");
22.}
23. }

Why I am getting the compilation error at lines 10,11,12 but there is no compilation errors at line 17,18, 20 what is the reasion.

I think If there is any error at lines 10,11,12 that will be repeat at line 17,18,19 also but I am getting the errors at lines 10,11,12 only why..?
please any one can help me..
Thanks in advance..
Shammem.
Hi this is Shameem..
I had doubt regarding to sylobus to SCJP...
the topics covered in k&B book is enough..for SCJP 1.5 ?
or else any new topics are required for SCJP1.5 other than the K & B..
Up to what extend I have to read util packages for SCJP...I had lot of confusion regarding to this..?

In K&B I read this statement..

The core interfaces you need to know for the
exam (and life in general) are the following seven:
1.Collection
2.Set
3.SortedSet
4.List
5.Map
6.SortedMap
7.Queue

like the above statement I read some statements..in K& B is it TRUE
any body Please send me the repply as early as possible..
thanks in Advance...
Shameem
Hi this is Shamemm...
I am facing the problem while getting the data from the dropdown box.

<select class="dropdown1" name="bloodgroup" autocomplete="off" abindex="22">
<option value="aa" selected>--select--</option>
<option value="A+">A+</option>
<option value="A-">A-</option>
<option value="B+">B+</option>
<option value="B-">B-</option>
<option value="AB+">AB+</option>
<option value="AB-">AB-</option>
<option value="O+">O+</option>
<option value="O-">O-</option>
</select>

Suppse I select bloodgroup as A+,A-,B+...etc and click on the save button when I try to get the dropdown box value like this...

String strBloodgrp=request.getParameter("bloodgroup");
I am getting the strBloodgrp(out put of strBloodgrp) like this...
A,B,AB etc...
but I accpecting the strBloodgrp(out put of strBloodgrp) like this...
A+,A-,B+,B-,AB+ ,etc...
can we get the out put like this...
I tried this with hidden fields also but I didn't get the out what I accepect...
Please any one can Repply me..
Thanks & Regards..
Shameem.
Hi this is Shamemm...
I am facing the problem while getting the data from the dropdown box.

<select class="dropdown1" name="bloodgroup" autocomplete="off" abindex="22">
<option value="aa" selected>--select--</option>
<option value="A+">A+</option>
<option value="A-">A-</option>
<option value="B+">B+</option>
<option value="B-">B-</option>
<option value="AB+">AB+</option>
<option value="AB-">AB-</option>
<option value="O+">O+</option>
<option value="O-">O-</option>
</select>

Suppse I select bloodgroup as A+,A-,B+...etc and click on the save button when I try to get the dropdown box value like this...

String strBloodgrp=request.getParameter("bloodgroup");
I am getting the strBloodgrp(out put of strBloodgrp) like this...
A,B,AB etc...
but I accpecting the strBloodgrp(out put of strBloodgrp) like this...
A+,A-,B+,B-,AB+ ,etc...
can we get the out put like this...
I tried this with hidden fields also but I didn't get the out what I accepect...
Please any one can Repply me..
Thanks & Regards..
Shameem.
class ObjectTest <type>
{
private type num1;
private type num2;
ObjectTest(type val1,type val2)
{
this.num1=val1;
this.num2=val2;
}
public type getValue1()
{
return num1;
}
public type getValue2()
{
return num2+num1; //Getting the compilation Error Here
}
};
class GenTest
{
public static void main(String args[])
{
ObjectTest<Integer> it1= new ObjectTest<Integer>(236, 175);
System.out.println("int value 1---->"+it1.getValue1());
System.out.println("int value 2--->"+it1.getValue2());
}
};
when I compile the Above code I am getting the compilation Error at the comment line. Why that error raising...
I am adding the same data types...what is the reasion behind this.
Hi this is shameem.sk.....
My preparation for the SCJP1.5 is struck with this problem..
can any one explan...(java.shameem@gmail.com)
class ObjectTest <type>
{
private type num1;
private type num2;
ObjectTest(type val1,type val2)
{
System.out.println("num1 in consturctor--->"+num1);
System.out.println("val2 in consturctor--->"+val2);
this.num1=val1;
System.out.println("num1 After Asigning in consturctor>"+num1);
this.num2=val2;

}
public type getValue1()
{
return num1;
}
public type getValue2()
{
return num2;
}
};
class GenTest
{
public static void main(String args[])
{
ObjectTest<Integer> it1= new ObjectTest<Integer>(236, 175);
System.out.println("int value 1-------->"+it1.getValue1());
System.out.println("int value 2-------->"+it1.getValue2());
System.out.println("---Before passing the String Object--");
ObjectTest <String> it2= new ObjectTest<String>( "ishmayel","Raj");
System.out.println(" String 1------->"+it1.getValue1());
System.out.println(" String 2------->"+it1.getValue2());
}

};
When Run the above code I get the out put like this..............

****************output Starts*****************************
num1 in consturctor--------->null
val2 in consturctor--------->175
num1 After Asigning in consturctor----->236
int value 1---------->236
int value 2---------->175
----Before passing the String Object----
num1 in consturctor---->null
val2 in consturctor---->Raj
num1 After Asigning in consturctor------->ishmayel
String 1----->236
String 2------>175

****************output Ends*****************************
q) why we got the
String 1------>236
String 2------>175

why we are not getting the out put like this

String 1------>236
String 2------>175

Thanks & Regards..
Shameem.
Hi in Generics I seen wildcard Arguments and Bounded WildCards
are those importnat for the SCJP.
Hi this is Shameem,
I want write SCJP1.5 for the next month ending..
Now I want SCJP1.5 Mock test If any body had Information regarding that please send me( java.shameem@gmail.com )ok.
Thanks & Regards..
Shameem.