How to convert a string to long?

Answers were Sorted based on User's Feedback



How to convert a string to long?..

Answer / satya


long l=Long.parseLong(Strin s)

Is This Answer Correct ?    5 Yes 0 No

How to convert a string to long?..

Answer / ravikiran(aptech mumbai)

Long l=Long.parseLong(String s);
long l1=l.longValue();

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More Core Java Interview Questions

How will you measure that int takes up only 32 bits in memory?

2 Answers   Rolta,


Is 0 true or false in java?

0 Answers  


What is the relationship between class and object?

0 Answers  


why do we use interface in java?

5 Answers  


What is get () in java?

0 Answers  






What is unicode datatype?

0 Answers  


What is java util list?

0 Answers  


Which containers may have a MenuBar?

1 Answers  


What is an anonymous class in java?

0 Answers  


how to call a method in different package?

4 Answers  


How can we avoid including a header more than once?

0 Answers   Fidelity,


what is the role of xml in core java?? and how we can use it?? can somebody give a sample program with explanation and from where i can read more about xml?????

0 Answers   HCL, SAP Labs, Vital Soft,


Categories