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



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

Have Programming Question? Ask it here!
 
 
 


jithin
absolutely no idea abt a program
1 Answer(s)      5 years and 9 months 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 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
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  program of jdbc using ms access for creating table
program
program  write a html program in show table and this word in box
program
program  write a javascript program to create a application form with validation
program
program  WAP a java program to form 1/2+3/4+5/6+7/8 series
program
program  develop a servlet to insert the data in the database from our program in the table stored in the database
program
program  write a program reversee a string. input-hi this is roseindia output-roseindia is this hi
program
program   Write a program to find the difference between sum of the squares and the square of the sums of n numbers
program
program   An old-style movie theater has a simple profit program. Each customer pays $5 per ticket. Every performance costs the theater $20, plus $.50 per attendee. Develop the program calculateTotalProfit that consumes
program
program  write a java program to input a no. and print wheather the no. is a special no or not. (special no. are those no whose factorial of the sum of digit of the no is same as the original
program
program  Develop the program calculateCylinderArea, which accepts radius of the cylinder's base disk and its height and computes surface area of the cylinder
program
program  explanation of program on extending thread class   Hi Friend, Please go through the following link: Java Threads Thanks
Program
Program  a program to create two classes Commercial and Domestic. Override the method calculatebill() of Commercial class(Rs.8 per unit) into Domestic class(Rs 6 per unit) to compute electricity bill for both classes
Program
Program  a program to prove that default constructor of super class is available to subclass by default. Define a parameterize constructor for super class to store name = ‚??Tommy‚?? age=‚??23‚?? and call this constructor
program
program  how to improve programming skills plss tell some tips..i am understanding concepts but unable to write program so,pls give some guideness plsss
program
program  Develop a program that computes the distance a boat travels across a river, given the width of the river, the boat's speed perpendicular to the river, and the river's speed. Speed is distance/time, and the Pythagorean
program
program  no i want a program that shows how merge sort algorithm works in graphical representations like numbers are taken in circles and computation... in rectangles or circles wat ever it may be. the theme of program is to show algorithm
program
program  i want a progra in java to print a sentence in alphabetic order, taking the input from the user.the program should writen without using the array for example : if input= this is a cat then output sould = a cat
program
program  Write a JSP Program, which displays a web page containing the name of the Courses, Courses being offered currently, number of students enrolled in each course, new courses to be offered, eligibility criteria for taking
program
program  . Develop a program that accepts an initial amount of money (called the principal), a simple annual interest rate, and a number of months will compute the balance at the end of that time. Assume that no additional
to devolp program
to devolp program  I want develop a program as a my project, i want idea to create
program
program  Write a program to print details of a week for a particular day using array of objects Integer and String. OUTPUT: First Day of Week is Monday Second Day of Week is Tuesday Third Day of Week is Wednesday Forth Day
Advertisements
 

 

 

DMCA.com