• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

need help

 
Hai6
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3742
16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Steve Luke
Bartender
Posts: 4181
22
IntelliJ IDE Java Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Hai6", please check your private messages.
 
Rob Spoor
Sheriff
Pie
Posts: 20611
63
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Campbell Ritchie
Sheriff
Pie
Posts: 49827
69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As well as the warning about the name, please use more informative titles for your threads.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic