Prashanth Patha

Ranch Hand
+ Follow
since May 06, 2011
Prashanth likes ...
Eclipse IDE Oracle Java
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
2
Received in last 30 days
0
Total given
3
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Prashanth Patha

Thanks for all,

I am able to set the values for properties using the method "setCssText(string)" and i have written code to extract the the content from "styleSheet" object initialized previously and written that into new file. Its working properly now.
Hi @E Armitage

I have gone through api also, but didn't find the way to do it. I think there would be some way to do it without trying to write entire contents into new file.
Hi @Paul Clapham , i have edited my post . My actual question is : "how to commit the changes (set through setCssText(string) ) so that the new property value of color would be written into the css file ?"

Hi,

I would like to use CSSParser(http://cssparser.sourceforge.net/) for the manipulation of css file using Java.

I was able to read the css file using following piece of code.



In above code, i was able to read the properties and display . But, now i would like to replace 'color' property in following css class.

.loginproductname
{
color : #ffff;
}

I used the following , but it is not writing into the css file previously mentioned through input stream



What is the code for writing or committing the changes set ( replacing certain properties values in css file ) in this case ?

Note : If you know any other good css parser to read and write , please suggest me. Please try to clarify above doubt also.

Thank you...


I would like to write ocpjp certification exam in the next 10 days.

What are the things to be observed and tips for completing the exam successfully ?

Please give your valuable suggestions...

Thanking you..
I would like to write exam in next 10 days and is it ok to purchase voucher from outside institute (which is offering discount on voucher) rather than oracle directly.

are there any differences between voucher purchased directly from oracle site and voucher purchased from outside.

Please give your valuable suggestions.......

Thanking you...

Thanks for such a good explanation....
Thanks for all... this entire discussion lead me to have good knowledge on island of isolation..

nitin sethi wrote:Hi All,

Considering the clarification given above, since i3 and i5 have been created through boxing and the value (21) given to them is also within the range of -128 to 127, i think it's quite logical that the expression i3==i5 is true. However, when I ran the code, it turned out to be false. Can anyone please explain?

Regards,
Nitin Sethi

Hi nitin sethi,

You said when code was run, it turned out to be false for i3==i5. But I checked it once by running the same code and it turned out to be true.. So once again check it .
Thank you Henry Wong for your nice reply.............
@Henry Wong,
Doubt :

as you said , the following line perfectly executes :



I have some doubt here , that previously in other thread you said something like " this type of line when compiled gets converted to something like this :



If this happens , i think it won't get compiled successfully.So, something different thing will be happened.. like :

" at first , the int literal 5 would be converted to short literal 5 and it will be replaced by : Short s=Short.valueOf(short literal 5 will be here); " .. am i right ? Because, if it is like : Short s= Short.valueOf(5) // it won't get compiled.





Hama Kamal wrote:hi guys,

2- why do i get run time error for the followin?



Here , the string "0xa" is not correct... we have to write it as Integer.valueOf("a",16) . This is because , it already requires second argument that shows radix.

Hama Kamal wrote:hi guys,

i'm a little confused about below issues ,, could you please help?
1- from K&B book , page 240 ,The valueOf() Methods : it states :
The two (well, usually two) static valueOf() methods provided in most of the
wrapper classes give you another approach to creating wrapper objects. Both
methods take a String representation of the appropriate type of primitive as
their first argument
>>>>>>>>>>>>>>>>>>IF THE METHOD ONLY TAKES ONE ARGUMENT IT CAN BE OF TYPE OF THE PRIMITIVE BEING CONSTRUCTED AS WELL LIKE : Float f2 = Float.valueOf("3.14f"); it can be declared as Float f2 = Float.valueOf(3.14f); which means it is not only String which can be passed as argument !!
am i right?



Hi Hama Kamal,

text in K&B means that usually there would be two valueOf() methods in most of the wrapper classes (such as Integer,Long,Short etc.. ) that takes the first argument ( it doesn't mean that it is the only argument) in String representation and second argument(if exists) takes radix.
And as you wrote, we can also send float literal to Float ,int literal to Integer, long literal to Long etc., instead of String representation.
Congratulations Sagar Shroff......

12 years ago