Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

i need some other logic

 
tulasi reddy
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My Requirement is

public String MethodName(String query, List listValues)
{
//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' "

I have done like this

can you just check the code.let me know what are the changes to be done.
or can i use some other logic.

with regards,
Tulasi.
 
Joanne Neal
Rancher
Posts: 3742
16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Search logic might help. This is at least the third post asking for help on this question.
 
Rob Spoor
Sheriff
Pie
Posts: 20495
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which means that either someone is using multiple accounts, or this is a homework assignment.

Anyway, this thread already has been handling this topic.
 
Campbell Ritchie
Sheriff
Posts: 48453
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Several people on the same course. The person who has got the farthest has been given an additional related assignment which seems even more difficult.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic