A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.tutorialspoint.com/java/number_parseint.htm below:

Java - parseInt() Method

Java - parseInt() Method Description

This method is used to get the primitive data type of a certain String. parseXxx() is a static method and can have one argument or two.

Syntax

Following are all the variants of this method −

static int parseInt(String s)
static int parseInt(String s, int radix)
Parameters

Here is the detail of parameters −

Return Value Example
public class Test { 

   public static void main(String args[]) {
      int x =Integer.parseInt("9");
      double c = Double.parseDouble("5");
      int b = Integer.parseInt("444",16);

      System.out.println(x);
      System.out.println(c);
      System.out.println(b);
   }
}

This will produce the following result −

Output
9
5.0
1092

java_numbers.htm


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4