I am working on a small password generator in Java, and I need some help filling a char array.
Basically, I need to fill it automatically with numbers that will relate to the ASCII values of 33 - 126.
I want to do this with a for loop, and so far all I have is this
for(int i = 0; i < charArray.length; i++)
{
charArray[i] = (char)(i + 1);
System.out.println(charArray[i]);
}
As you can see, that starts filling it so that element 0 has a value of 1, element 1 has a value of 2, etc. I need it to start at 33 and then increment by one, so element 0 has a value of 33, element 1 has a value of 34, etc.
Can anyone tell me how I would do this? I know this is a total noob question, I'm just stuck.
int i = 0
(i + 1)The solution is obvious and involves modification of one and only one of those two expressions. If you can't figure what to do you're really bad.
>>6
You're a fucking retard, I never had issues like this, you will never be a successful programmer because of your inferior genetic material, please do not have children and please stop posting.
>>9
I'm not mad at all, I just explained to you why you will never be a successful programmer.
You're not supposed to have issues with stuff like >>1, nobody but retards have them.
You need to chill, I've been at this for less than a week, and I am doing it in my spare time.
Name:
Anonymous2011-11-19 16:06
>>11
I am perfectly calm, there is no need for me to ``chill''.
I'm just explaining to you why programming is not a worthwhile pursuit for you, you will not be successful and should try something else, something more suited to a person at your level of ability/intelligence.
>>14
Most people fall off the bike because it takes a while to learn to properly balance it. Some people fall of the bike because they have no arms or legs. You can usually spot the difference.
>>15
Trick question. This kid is getting trolled off the bike.
Name:
Anonymous2011-11-19 16:42
>>11
You shouldn't have problems with what you're trying to do after an hour. If you've been at it for a week and still couldn't figure it out then you're really dumb.
>>13
Do you really think that if he can't add 33 to a number in Java he'll be capable of even finishing the first subchapter of SICP?
>>17 Do you really think that if he can't add 33 to a number in Java he'll be capable of even finishing the first subchapter of SICP?
Isn't that how most of the smug lisp weenies are formed? Because I'm pretty sure that that's exactly how most of the smug lisp weenies are formed!
>>19
Until you write fibs and fact in shitty languages like C++, you cannot appreciate the beauty of a lisp.
Name:
Anonymous2011-11-19 18:57
>>13
Take SICP and shove it up your ass you fucking hourly nigger. Seriously, SICP hasn't gotten you a programming job at google or microsoft. Now go fuck you.
>>23
I bet the authors of SICP would wanna kick the shit out of if they found out you read this book only to end up working some shit hourly job at some hick firm.
Name:
Anonymous2011-11-19 20:18
>>24
Better having no job at all, than having Java job. Java is like cleaning toilets at McDonalds your whole life.
Name:
Anonymous2011-11-19 20:23
>>25
Well you wouldn't know because you don't have the mental capacity to work as a programmer. Now go work your hourly shift you fucking stupid nigger.
Name:
Anonymous2011-11-19 20:29
>>25
I used to work as in fast food as my very first job when I was a young kid, and yes, YOU are required to clean the bathroom. Where I worked, there was a lady who would go out and always clean the dining room and bathroom, but when she was not there, others had to do it sometimes. I would always seem to disappearwhen it came to volunteers to cleaning the bathroom, so I never had to do it. But normally in the job interview they will ask you if you mind cleaning, because it is in the job description... Also, you jhaveto clean more than just the bathrooms... Once I seen a manager make another employee clean out the fryers.. GROSS!!!! I wanted to barf just watching... It was truly disgusting.