write a program in Java to accept or enter a string constant and convert that into a number using conversion function.
Answers
Answered by
0
Answer:
import java.util.*
public static void main(String args[])
{Scanner sc=new Scanner(System. in) ;
String str=sc. nextLine() ;
int i=str. parseInt() ;
}
Answered by
1
import java.util.*
public static void main(String args[])
{Scanner sc=new Scanner(System. in) ;
String str=sc. nextLine() ;
int i=str. parseInt() ;
}
Similar questions