InterviewSolution
Saved Bookmarks
| 1. |
Wap in java to enter string and display shortest word and length of shortest word. |
|
Answer» tion:import java.util.*;class stringcheck { public static VOID main(){ SCANNER sc=new Scanner(System.in); System.out.println("ENTER the sentence"); String st=sc.nextLine(); INT L=st.length(); CHAR ch; int k=0,arr[ ]=new int[0] , c=0; for(int i=0;i |
|