Lets Solve Camel Case Program In Java

 package demo;


public class CamelCase {


public static void main(String[] args) {

String str = "saveChangesInTheEditor";

int count = 1;

for (int i = 0; i < str.length(); i++) {

int a = str.charAt(i);

if (a >= 65 && a <= 90) {

count += 1;

}

}

System.out.println(count);

}


}


Comments

Popular posts from this blog

3 Lines of Code And You Can Download Your Favourite Youtube Video.

Leetcode Problem(Easy) Roman to Integer

Leetcode : (Find Minimum in Rotated Sorted Array)