answersLogoWhite

0

All of the Java number classes have a parse[type] method, like parseInt() in Integer or parseDouble() in Double that convert Strings to primitive numbers.

String s = getInput();

int var = Integer.parseInt(s);

User Avatar

Wiki User

15y ago

What else can I help you with?

Continue Learning about Engineering
Related Questions

What is the best way to trap a gorilla?

Take a stick put it under a cardboard box holding the box up tie a string on the stick hide behind a tree and put a banana under the box then when he is under it pull the string and you got your gorilla


What is the best brand of string lights?

Smith & Hawken has the best string lights. You can find them at target.


What is the best string used to make bracelets?

elastic (a stretchy string)


What are the Best quality and sounding brand 6 string acoustic guitars for under 250.00?

you wont get a completely fabulous guitar for under $250, but i would recomend that you try ibanez guitars.


What type of string is the best to use in a pulley system?

A strong and durable type of string, such as braided rope or nylon cord, is best to use in a pulley system. These materials are less likely to stretch or break under tension, making them ideal for transferring force in a pulley system effectively.


What is the best way to replace a guitar string?

The best way to replace a guitar string is to loosen the old string, remove it from the tuning peg, thread the new string through the bridge and the tuning peg, tighten it to the desired pitch, and trim any excess string.


Is it best to start a child off on string or brass instruments?

It is best to start a child off on a string instrument. Stings are harder to play than brass instruments so, mastering a string early is the best bet.


How do you tell a vintage book or first edition?

There are several ways to tell if a book is vintage or first edition. The best way is to look at the string of numbers on the copyright page. If the sequence of numbers contains a 1, it is likely a first edition.


What rhymes with harpist that is best string plucker?

One suspects a mischievous reason for this question, but no matter. The harpist is the best string plucker, The chicken is the best clucker.


What is the best way to play a guitar C note?

The best way to play a guitar C note is to place your third finger on the 5th fret of the 3rd string (A string) and pluck that string.


What is 36 times 10 to the 3 power plus 15 times 10 to the 2 power?

It's best to convert those numbers from scientific notation to normal notation; that makes it easy to add them. After adding them, you can convert back to scientific notation if you want. Another option is to keep the numbers in scientific notation, but to convert them so that both have the same exponent.


What is the best string for tennis?

There is no 'best string'. Even professionals use different strings because different strings suit different needs.