Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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