File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Few Java Queries Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Few Java Queries" Watch "Few Java Queries" New topic

Few Java Queries

Deepak Lal
Ranch Hand

Joined: Jul 01, 2008
Posts: 561

Hi all,
i have few java queries.

1)write a java program to sort numbers without using sort method
1)selection sort 2)bubble sort

2)w a j p to search given number using 1)linearsearch 2)binary search

3)W a j p to print * like


* *

* * *

When The Going Gets Tougher,The Tougher gets Going
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
Hello "Deepak A L"-

Welcome to JavaRanch.

On your way in you may have missed that we have a policy on screen names here at JavaRanch. Basically, it must consist of a first name, a space, and a last name, and not be obviously fictitious. Since yours does not conform with it, please take a moment to change it, which you can do right here.

As to your questions, they look like homework that you should be doing. Nobody here is going to do them for you, although people will try to help you. So: What ideas have you had so far on solving these?
Ankit Garg

Joined: Aug 03, 2008
Posts: 9465

[ UD: We really don't like to do people's homework. ]
[ August 07, 2008: Message edited by: Ulf Dittmer ]

SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Bill Shirley
Ranch Hand

Joined: Nov 08, 2007
Posts: 457
welcome to Java Ranch,

Bill Shirley - bshirley -
if (Posts < 30) JavaRanchFAQ);
sudipto shekhar
Ranch Hand

Joined: Apr 02, 2008
Posts: 823

Hi deepak,

Welcome to the group.I would surely help you but let me ask you, are you new to JAVA or are you new to programming? If you are new to programming then i would suggest you to go through any book of 'C' language which will explain you the basics of looping,condition checking etc like "for" loop,do...while etc,use it in your program(expecting at least you know how to write a class,method, creating an instance of a class). I think this will surely help you.

With Regards,


Regards, Sud.
Rob Spoor

Joined: Oct 27, 2005
Posts: 20274

Why haven't I moved this to the beginner's forum before?

How To Ask Questions How To Answer Questions
I agree. Here's the link:
subject: Few Java Queries
It's not a secret anymore!