Question Index

Write a program to check whether the characters in the given word are equally spaced word or not. The distance between the characters should be same for a word to be equally spaced word.

Input String word Output (Boolean)
Fox true
abcd true
acids false
acegi true
dins true
abandon false
hi true

class IsEquallySpacedWord
    public static void main(String s[])
        String inputWord = "Fox";
        System.out.println("Is '" + inputWord + "' equally spaced : " + isEquallySpacedWord(inputWord));;


    public static boolean isEquallySpacedWord(String inputWord) {




Topic: charAt() Method In Java - Java Character Extraction

Read this topic
Take test on this topic

Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App