Skip to content

Commit

Permalink
Merge pull request TheAlgorithms#370 from GammaBurst101/change
Browse files Browse the repository at this point in the history
Closed scanner and changed a method to private
  • Loading branch information
varunu28 authored Jan 24, 2018
2 parents 555b715 + 206b9aa commit 81d3e9b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Others/CountChar.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public static void main(String[] args) {
Scanner input = new Scanner(System.in);
System.out.print("Enter your text: ");
String str = input.nextLine();

input.close();
System.out.println("There are " + CountCharacters(str) + " characters.");
}

Expand All @@ -24,7 +24,7 @@ public static void main(String[] args) {
* @return int: Number of characters in the passed string
* */

public static int CountCharacters(String str) {
private static int CountCharacters(String str) {

int count = 0;

Expand Down

0 comments on commit 81d3e9b

Please sign in to comment.