Search:

Type: Posts; User: shenaz

Page 1 of 2 1 2

Search: Search took 0.07 seconds.

  1. [SOLVED] Re: replacing few keywords with corresponding operators

    ok i will try.but i don't know to use map,if u could post some links to learn about it,it would be helpful.
  2. [SOLVED] Re: replacing few keywords with corresponding operators

    class keys{
    public static void main(String[] args)
    {
    String str="if(a greater than b)";
    if(str.contains("greater than"))
    str=str.replace("greater than",">");
    if(str.contains("lesser than"))...
  3. [SOLVED] Re: replacing few keywords with corresponding operators

    am trying to read a string and check if it contains the keywords am looking for.If it contains those keywords,i should replace it with operator.
    now to check if a string contains the keyword if...
  4. [SOLVED] Re: replacing few keywords with corresponding operators

    I know how to use replace() method.my problem is when i read a string,how should i check if it contains the keywords i mentioned in post#1,and then replace with its corresponding operator.
  5. [SOLVED] Re: replacing few keywords with corresponding operators

    its about replacing only.but am not understanding how to do it.
  6. [SOLVED] Re: replacing few keywords with corresponding operators

    Ya i tried.I just want to know what concept i should use for the problem i stated.
  7. [SOLVED] replacing few keywords with corresponding operators

    Suppose i have a string as fallows
    if(a greater than b)
    and i want to replace "greater than" with ">",how should i replace?
    i want to replace the following keywords with corresponding operators...
  8. Replies
    3
    Views
    1,048

    [SOLVED] Re: pattern matching

    ok. thank you.
  9. Replies
    3
    Views
    1,048

    [SOLVED] pattern matching

    how to write a pattern for matching the following line
    print "hello world1" .
  10. Replies
    0
    Views
    1,146

    How to link .java code in eclipse to tomcat

    I have written a code in java for some conversion in eclipse IDE.And i have designed an UI using js and jsp.
    The inteface has two textarea and browse button,convert button.I have written a Jsp code...
  11. [SOLVED] Re: matching elements of one array with another array.

    No more questions regarding this.Thank you.And i have already marked it as solved.
  12. [SOLVED] Re: matching elements of one array with another array.

    ya rite.I will include conditional check in for loop.Thanks alot for responding in early :)
  13. [SOLVED] Re: matching elements of one array with another array.

    ya .contains doesn't work out,instead i used .matches.It's working fine.And i removed break statement.
    i just want to know if my approach in writing code was rite or i need some changes in the code...
  14. [SOLVED] Re: matching elements of one array with another array.

    public class arrays
    {
    public static void main(String[] args)
    {
    String int_array[]=new String[20];//int_array has a b c elements
    String float_array[]=new String[20];//float_array has a1 b1 ...
  15. [SOLVED] Re: matching elements of one array with another array.

    Ya i want to know items in one array, say array1 is present in which array.Not the order.I just want to know which array contains elements of array1.Am sorry am not able to code properly for this.So...
  16. [SOLVED] Re: matching elements of one array with another array.

    ya i have tried with loops.since arrays may be of different length am getting ArrayIndexOutOfBoundException.So am not able to code.
  17. [SOLVED] matching elements of one array with another array.

    I have 3 arrays.
    array1 has a b(suppose)
    array2 has a
    array 3 has b
    how to find in which array ,array1 elements are present?
    here all 3 array may or may not be of same length.
  18. Replies
    3
    Views
    1,323

    [SOLVED] Re: placing comma between strings in a line

    public class first
    {
    public static void main(String args[])
    {
    String line,line1;
    String array[]=new String[20];
    BufferedWriter bw = new BufferedWriter(new...
  19. Replies
    3
    Views
    1,323

    [SOLVED] placing comma between strings in a line

    I read a file containing declaration statements like int a b float a1 b1 in separate lines.
    now i should copy these read line into another file by separating variables with comma as we declare in...
  20. Replies
    20
    Views
    1,053

    [SOLVED] Re: to replace a word in file

    Ya right.complete code i din't post.it was appending to file but now i changed it.used replace().

    --- Update ---

    Yes yes.So i din use replace() inside loop.
  21. Replies
    20
    Views
    1,053

    [SOLVED] Re: to replace a word in file

    Thank you:)

    --- Update ---

    File contains algorithm.
  22. Replies
    20
    Views
    1,053

    [SOLVED] Re: to replace a word in file

    No problem.I will mark it as solved.

    --- Update ---

    I deleted writing newtxt to file.Instead after for loop i used s.replace() for replacing old contents with new.And then at once i wrote...
  23. Replies
    20
    Views
    1,053

    [SOLVED] Re: to replace a word in file

    b.write(s.toString) i used for writing to file. And then b.write(newtxt) for replacing.

    --- Update ---



    --- Update ---

    Thank you.As you told newtxt is not needed.But when i use replace()...
  24. Replies
    20
    Views
    1,053

    [SOLVED] Re: to replace a word in file

    The code i posted is partial.I din post the code of main function where am reading from one file.I stored the read contents in an array and passed it to a function.I have posted only that function.
  25. Replies
    20
    Views
    1,053

    [SOLVED] Re: to replace a word in file

    I am writing contents of array to a file.Array has "integer" "a" "b".
Results 1 to 25 of 38
Page 1 of 2 1 2