Three years ago, I remembered my teacher teaching us how to create a program that reverses a string. But before that, I tried to solve the problem, which I did. :D
The code below reverses a string:
private static String reverse( String in )
{
char tmp;
char[] arr = in.toCharArray();
int i, y;
for( i = in.length()-1, y = 0; y < arr.length / 2; i--,y++ ){
tmp = arr[i];
arr[i] = arr[y];
arr[y] = tmp;
}
return new String(arr);
}
It is easy to understand :-)
Note: The code is in JAVA but you can do the same to other languages following the algorithm.
Archive for September 2010
Java Code - String Reverser
Java-ness again
Two years ago I used to love the Java Language. But because of the disadvantages that I saw in using it, I discontinued to learn it. My last was during the time where we had our Data Structures and Algorithms class, in which Java Language is a requirement.
I was introduced to many other things, including Adobe Flex, PHP, C#, and Symbian C++. These were very interesting languages and framework for a college student to learn but I don't need to master them, which I just realized.
This time, programming in Java is a must. I got a freelance job which needs to use Java language. Good thing, it is not that hard to learn Java again. I have a background of it, which contributed a lot to finish the job immediately.
JCreator Pro was the program that I used to code the problems given to me. I got a copy of it's version 4.5Pro and I looked for serial keys or key generators available for it. By using it, programming will become much more easier because of its features.
Click here to search for JCreator Pro v4.5 with keygen in Google.
Inkscape - Open Source Software
In line with the celebration of Software Freedom Day 2010, I gave a talk about using Inkscape. An application with capabilities similar to Corel Draw, and etc. It is a free vector tool for all the designers and non-designers. Easy to use and fast.
Some of the topics I discussed was about making photopopped image effect, which I learned from the tutorials through Youtube. Fast making of shiny button and glossy text effects. I also introduced how to make logos and use filters. :-)
Over all, it was a success. I hope some of the students that entered my talk have learned something from this free software from Inkscape.org