File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes need help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "need help " Watch "need help " New topic
Author

need help

Hai6
Greenhorn

Joined: Oct 07, 2008
Posts: 1
public String MethodName(String query, HashMap)
{
//Here your code

}

There should be a test method i.e main in the class you are going to create
Tasks to be done:
1.Query =" VouchNumber='~VouchNum~' AND BusinessUnit='~BU~' AND InvoiceNumber='~IN~' "
HashMap will contain key value pair all strings VouchNum=00005, BU=0231,IN=3443

Output should be :
VouchNumber='00005' AND BusinessUnit='0231' AND InvoiceNumber='3443'



can anyone help me abt this.
[ October 08, 2008: Message edited by: Hai6 ]
Joanne Neal
Rancher

Joined: Aug 05, 2005
Posts: 3645
    
  15
Perhaps one of your classmates will be able to help you.

You should read this to find out why nobody else will at the moment

[ October 08, 2008: Message edited by: Joanne Neal ]
[ October 08, 2008: Message edited by: Joanne Neal ]

Joanne
Steve Luke
Bartender

Joined: Jan 28, 2003
Posts: 4181
    
  21

please make the necessary changes as quickly as possible.


This isn't a code mill, we generally won't do the work for you. We also can't diagnose the problem without more details about what 'a little wrong' means. What is happening that you don't like?

-- Woops - Didn't realize this was class work --

You should use Prepared Statement rather than build your own method (if your teacher allows it...
[ October 08, 2008: Message edited by: Steve Luke ]

Steve
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

"Hai6", please check your private messages.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19718
    
  20

Originally posted by Steve Luke:

You should use Prepared Statement rather than build your own method (if your teacher allows it...

Except it isn't a real database they need to search, it is a Map.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39388
    
  28
As well as the warning about the name, please use more informative titles for your threads.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: need help