write a program in Java to enter a number and convert that into string constant using conversion function.
Answers
Answered by
1
Answer:
import java.util.*;
class No
{
public static void main (String args[ ])
{
Scanner sc =new Scanner (System.in);
int x =sc.next Int();
string l = x;
system.out.in println ("now the number entered is an string ");
}
}
Explanation:
done by using scanner class and explicit type conversion or type casting.....
hope it helps...
Similar questions