Online Training Spring Hibernate Training in Delhi R Programming Training Course Big Data and Hadoop Training Java Training  
 

absolutely no idea abt a program

Ads

 
 

Share on Google+Share on Google+

jithin
absolutely no idea abt a program
1 Answer(s)      8 years ago
Posted in : Java Beginners
Ads
View Answers

October 29, 2008 at 10:50 AM


Hi friend,

Code to solve the problem :


import java.io.*;
class SortString {
public static void main(String args[]) throws IOException {
BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
System.out.println("Please enter string:");
String str = bf.readLine();
String arr[] = str.split(" ");
for(int j = 0; j < arr.length; j++) {
for(int i = j + 1; i < arr.length; i++) {
if(arr[i].compareTo(arr[j]) < 0) {
String t = arr[j];
arr[j] = arr[i];
arr[i] = t;
}
}
System.out.print(" ");
System.out.print(arr[j]);
}
}
}

For more information on java visit to :

http://www.roseindia.net/java

Thanks




Ads









Related Tutorials/Questions & Answers:
absolutely no idea abt a program - Java Beginners
absolutely no idea abt a program  write a program in java/blue to accept a string from the user and arrange it alphabetically wordwise.. example- input--i am a boy. output--a am boy i.   Hi friend, Code
please give me an idea to develop a program for this question?
please give me an idea to develop a program for this question?  How to enter a text or number from keyboard without using InputStreamReader method in java
Advertisements
abt the bank application
abt the bank application  pls can u send to me the user table and transaction table sql statement with their datatype used in this bank application to my email
abt proj - Java Beginners
abt proj  if we have already make login page and resister page, if i click on the login button we go to the home page ,home page contain some data plz help
Version of com.slamdata>abt-core_2.11 dependency
List of Version of com.slamdata>abt-core_2.11 dependency
Version of com.slamdata>abt-core_2.12 dependency
List of Version of com.slamdata>abt-core_2.12 dependency
abt java - Java Beginners
abt java   hiiiii i m new to this language i have some problem with my java code ... i working on netbeans .. i write a code for user... correctly but when i run this program by command prompt the file contents change
abt jmeter - Java Server Faces Questions
abt jmeter  how to use jmeter for testing the program?   Hi friend, For using jmeter for testing visit to : http://www.roseindia.net/jmeter/ http://www.roseindia.net/jmeter/using-jmeter.shtml Thanks
abt proj - Java Beginners
abt proj  which topic i have to study carefully ,when I am going to start java project using swings  Hi Friend, Learn awt, swing containers, components, Events etc. For more information,visit the following links
abt java project - Java Beginners
abt java project  if we want to create a pannel on the button how to write on the code in side the button plz help
abt proj - Java Beginners
abt proj  I made login page, when i click on login button , thaen how to go on home page on home page containe some tab like add, delete, update,etc. plz help thanx  Hi Friend, Try the following: 1)LoginDemo.java
abt java project - Java Beginners
abt java project  I don't know too much about java , and I am working on java project, where editor is eclipse and backend postgresql How can i take help about my project, which book I should refers plz help me
abt java project - Java Beginners
abt java project  How to make the home page that contain four tabbedPane like additem, deleteitem ,update etc, so plz help me thanx  Hi Friend, Please go through the following link: http://www.roseindia.net
abt java project - Java Beginners
abt java project  this program compile sucessfully but data is not store in data base if any thing correction plz do it import java.awt.*; import javax.swing.*; import java.sql.*; import java.awt.event.*; public class
Maven Dependency abt-core_2.11 >> 0.0.3
You should include the dependency code given in this page to add Maven Dependency of com.slamdata >> abt-core_2.11 version0.0.3 in your project
Maven Dependency abt-core_2.12 >> 0.0.3
You should include the dependency code given in this page to add Maven Dependency of com.slamdata >> abt-core_2.12 version0.0.3 in your project
Maven Dependency abt-core_2.11 >> 0.0.2
You should include the dependency code given in this page to add Maven Dependency of com.slamdata >> abt-core_2.11 version0.0.2 in your project
Maven Dependency abt-core_2.12 >> 0.0.2
You should include the dependency code given in this page to add Maven Dependency of com.slamdata >> abt-core_2.12 version0.0.2 in your project
have no idea of doing it..... - JSP-Servlet
have no idea of doing it.....  how to create an jsp program to simulate rolling of a pair of dice. when a number is clicked the dice should roll and display the corresponding number present
need to ans abt db - JSP-Servlet
need to ans abt db  helllo can you tell me m just starting to knowing abt servlet and i trying to making e-mail site so can you tell me with the java servlet wht is the backhand database to use to proper with that site
idea for find the worm - Security
idea for find the worm  HI Guys, Please give any advise or code for find the worm and prevent the worm.I am doing the project as a distributed antiworm systems.Please help me
Version of mevenide>mevenide-idea dependency
List of Version of mevenide>mevenide-idea dependency
program
program  any program of hotel or school management
Java Barcode Program with Oracle database
idea abt this...Please can anyone give me some idea. Do I need to buy Java...Java Barcode Program with Oracle database  Hi Everyone, I need help to develop my new project, am going to do with barcode s/w, am very new
program
program  program of jdbc using ms access for creating table
program
program  write a javascript program to create a application form with validation
program
program  write a program different between to dates in terms of days in java
program
program  write a html program in show table and this word in box
Maven Dependency mevenide-idea >> 0.1
You should include the dependency code given in this page to add Maven Dependency of mevenide >> mevenide-idea version0.1 in your project
Maven Dependency mevenide-idea >> 0.2-SNAPSHOT
You should include the dependency code given in this page to add Maven Dependency of mevenide >> mevenide-idea version0.2-SNAPSHOT in your project
Maven Dependency mevenide-idea >> 0.2-20050609.233836
You should include the dependency code given in this page to add Maven Dependency of mevenide >> mevenide-idea version0.2-20050609.233836 in your project