in Education by
java program to input any string then print each word along with their length Select the correct answer from above options

1 Answer

0 votes
by
 
Best answer
import java.util.Arrays; import java.util.Scanner; class WordSort{ public static void main(String[] args){ Scanner sc= new Scanner(System.in); String word=””; while((word=sc.next()).length() >0){ char [] chars=word.toCharArray(); Arrays.sort(chars); System.out.print((new String(chars))+” “); } } }

Related questions

0 votes
    How to write a program in JAVA to print the sum of ASCII values of a particular word input ? Select the correct answer from above options...
asked Dec 28, 2021 in Education by JackTerrance
0 votes
    Write a program in JAVA to input a sentence reverse every word and print . Please answer someone. Select the correct answer from above options...
asked Dec 13, 2021 in Education by JackTerrance
0 votes
    write a program that inputs a strig and then print the string, equal to number of times its length Select the correct answer from above options...
asked Nov 30, 2021 in Education by JackTerrance
0 votes
    Write a JAVA program to find the area and perimeter of a square and rectangle. Store side in s , length as ... USE ANY INPUT METHOD Select the correct answer from above options...
asked Dec 22, 2021 in Education by JackTerrance
0 votes
    Write a program in Java to input any age and determine whether the age is valid or  invalid. If age is ... is valid otherwise invalid. Select the correct answer from above options...
asked Dec 24, 2021 in Education by JackTerrance
0 votes
    WAP in java to input 2 numbers from user and print their difference (Always Positive). Select the correct answer from above options...
asked Dec 19, 2021 in Education by JackTerrance
0 votes
    write a program in Java to input a number and print if it is a special number or not. do this program using ... nested and while loop . Select the correct answer from above options...
asked Dec 1, 2021 in Education by JackTerrance
0 votes
    write a Java program to accept a full name and display the initials along with the surname. URGENT! give the full program please Select the correct answer from above options...
asked Dec 31, 2021 in Education by JackTerrance
0 votes
    Write a JAVA program to store the marks of any 5 subjects in different variables. Calculate total and average. ... ANY INPUT METHOD Select the correct answer from above options...
asked Dec 22, 2021 in Education by JackTerrance
0 votes
    write a program to enter a sentence and check if it contains palindrome words or not. if yes then count and ... present. Java class 10 Select the correct answer from above options...
asked Dec 31, 2021 in Education by JackTerrance
0 votes
    write a program to input three integers and find the difference between their sum and difference Select the correct answer from above options...
asked Dec 20, 2021 in Education by JackTerrance
0 votes
    Write a program to store 10 names in an array. Arrange these in alphabetical orderby sorting. Print the sorted list. ... , LUCY, etc. Select the correct answer from above options...
asked Dec 12, 2021 in Education by JackTerrance
0 votes
    write a program in python to obtain 3 numbers and print their sum. Select the correct answer from above options...
asked Nov 29, 2021 in Education by JackTerrance
0 votes
    write a program to input a number and print table of the number using while loop Select the correct answer from above options...
asked Dec 31, 2021 in Education by JackTerrance
0 votes
    write a program to input number and print wether it is even or odd. Select the correct answer from above options...
asked Dec 21, 2021 in Education by JackTerrance
...