Saturday, March 25, 2017
Simple Program in Java that Reverses a String
So I decided to code a simple program today in Java because my laptop is down and I cannot access Visual Studio to program in C#, which is the language I'm used to.
The program reverses any string you input and displays it backwards.
I discovered something that Java doesn't have which C# does. C# treats a string as an array but Java doesn't. So in line 34, in C#, I could've typed "words[i] = str[count];". Which is syntactic sugar compared to Java. Yet C# is considered more complex than Java which you can read about in this link. Since I'm a novice in Java and have been groomed in C#, I guess I WOULD find C# must easier.
Below is my code. Please comment if you have an easier way to code this.
Subscribe to:
Post Comments (Atom)
How to Access the Metaverse
In February this year, Bernard Marr predicted that "in 2022, we'll see new, lighter, more portable VR devices, so instead of having...

-
The internet has established a new economy through cryptocurrency. I found a good read about Cryptocurrency in the article, What Is Cryptocu...
-
Although many software organizations do not use software simulation in the life-cycle of software projects because it takes time, money and ...
-
We began the event with presentations from leadership on the Technology Operating Model and how well the different departments in Tech are d...
No comments:
Post a Comment