Java program to reverse a sentence

Problem Write a java program to: Reverse a sentence by letters Reverse a sentence by words Reverse Sentence by letters Code  public class Main {      public static void main(String[] args) {          String sentence=“Welcome to java”;          System.out.println(reverseByLetters(sentence));      }      public static String reverseByLetters(String sentence){          char[] c=sentence.toCharArray();          String out=“”;          for (int i=c.length–1;i>=0;i—){              out+=c[i];          }          return out;      }  }   Output avaj ot emocleW Explanation First, we broke the String sentence into characters by calling the toCharArray() function on the string. … Read more Java program to reverse a sentence

Java program to convert Binary to Decimal

I am going to discuss three different ways to convert binary to decimal in java. Using the built-in Integer.parseInt() method Building our own logic when the binary number is given as a String variable Building our own logic when the binary number is given as an int variable Basic Concept of Conversion Let’s say we … Read more Java program to convert Binary to Decimal

Word Counter source code

This is the source code for the application “Word Counter”. For more information, visit: http://umersoftwares.blogspot.com/2018/06/word-counter-by-umer-softwares.html Source Code: View project on github Download project as zip file View code files: data.java hist.java infor.java mainscreen.java result.java setting.java  You may not copy, modify or redistribute it without prior permission from Hafiz Muhammad Umer ([email protected]). The application itself can … Read more Word Counter source code