Win a copy of OCP Java SE 8 Programmer II Exam Study Guide this week in the OCP forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

need help  RSS feed

 
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 ]
 
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 ]
 
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 ]
 
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Hai6", please check your private messages.
 
Sheriff
Posts: 21289
87
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.
 
Marshal
Posts: 58415
178
  • 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.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!