Posts by Vânia Almeida • 1 point
1 post
-
0
votes2
answers267
viewsA: How to split a number stored in a string and check if it is divisible by 495?
To turn string into int or long you can do so... Scanner s = new Scanner(System.in); String str = s.nextLine(); try { int inteiro = Integer.parseInt(str); long longo = Long.parseDouble(str); } catch…