I never heard that in java you can increase value of character type variable, this is possible but in Perl
Create array of characters and with use of "i" get the character from the array
so if char[] myArray = { 'A', 'B', 'C'}
then if i = 1
you get character B
So, define a length for the array at the start of class Rev: char[] a = new char[(some integer)];
You're still going to end up with issues, such as java.lang.ArrayIndexOutOfBoundsException: 65 when you try to access a['A'] and so on, because 'A' as a char is 65 as an integer, and integers are what you want to work with when accessing arrays.
I have no idea what your program's trying to do, but those are some thing to consider.
Last edited by peter_budo; Mar 1st, 2010 at 6:34 am. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks)
Re: my program is compiled.but on run that i have message "Exception in thread "main" jav
Your code only works if args.length >= 2 and if the args can be parsed as integers. In short, it is almost useless. As is upping a thread that is 3 years old.
Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.
This thread is more than three months old
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.