Quantcast
Channel: CodeChef Discuss - latest questions
Viewing all articles
Browse latest Browse all 39796

core java: stupid doubt

$
0
0

what's wrong with this class:

class reverse { public static void main(String[] ar) { Console c=System.console(); System.out.print("Enter the first number:"); String n=c.readLine(); System.out.print("Enter the second number:"); String m=c.readLine(); int[] arr1=Integer.parseInt(n); int[] arr2=Integer.parseInt(m); } }

I mean, i know string cant be parsed into an integer array.. so what's the way out??


Viewing all articles
Browse latest Browse all 39796

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>