Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners absolutely no idea abt a program
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


jithin
absolutely no idea abt a program
1 Answer(s)      6 years and a month ago
Posted in : Java Beginners



Advertisement
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





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 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
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  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 - 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 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 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  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
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
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
how to deploy struts2 app in Intellij idea
how to deploy struts2 app in Intellij idea  I have choosed idea as my ide, but till now i have used ant to make a build file. Manually i deployed it in server, then start the server. But As we know that, ide provide there own
how to deploy struts2 app in Intellij idea
how to deploy struts2 app in Intellij idea  I have choosed idea as my ide, but till now i have used ant to make a build file. Manually i deployed it in server, then start the server. But As we know that, ide provide there own
how to deploy struts2 app in Intellij idea
how to deploy struts2 app in Intellij idea  I have choosed idea as my ide, but till now i have used ant to make a build file. Manually i deployed it in server, then start the server. But As we know that, ide provide there own
how to deploy struts2 app in Intellij idea
how to deploy struts2 app in Intellij idea  I have choosed idea as my ide, but till now i have used ant to make a build file. Manually i deployed it in server, then start the server. But As we know that, ide provide there own
how to deploy struts2 app in Intellij idea
how to deploy struts2 app in Intellij idea  I have choosed idea as my ide, but till now i have used ant to make a build file. Manually i deployed it in server, then start the server. But As we know that, ide provide there own
how to deploy struts2 app in Intellij idea
how to deploy struts2 app in Intellij idea  I have choosed idea as my ide, but till now i have used ant to make a build file. Manually i deployed it in server, then start the server. But As we know that, ide provide there own
how to deploy struts2 app in Intellij idea
how to deploy struts2 app in Intellij idea  I have choosed idea as my ide, but till now i have used ant to make a build file. Manually i deployed it in server, then start the server. But As we know that, ide provide there own
how to deploy struts2 app in Intellij idea
how to deploy struts2 app in Intellij idea  I have choosed idea as my ide, but till now i have used ant to make a build file. Manually i deployed it in server, then start the server. But As we know that, ide provide there own
how to deploy struts2 app in Intellij idea
how to deploy struts2 app in Intellij idea  I have choosed idea as my ide, but till now i have used ant to make a build file. Manually i deployed it in server, then start the server. But As we know that, ide provide there own
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
Free Web Hosting - Why Its not good Idea
Free Web Hosting - Why Its not good Idea This article shows you why Free Web Hosting is not good Idea for hosting your web sites, specially when you are looking for getting high traffic on your web site. Also its very important
program
program  any program of hotel or school management
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
program
program  program of jdbc using ms access for creating table
Advertisements
 

 

 

DMCA.com