Search:

Type: Posts; User: RESHAM

Search: Search took 0.14 seconds.

  1. Thread: Java Compiler

    by RESHAM
    Replies
    7
    Views
    218

    [SOLVED] Re: Java Compiler

    value = inStream.read();
    error = errorStream.read();

    read() reads next byte of data from input stream
    so in the 1st iteration its (char)value=h and (char)error=j. you are reading one character...
  2. Thread: Java Compiler

    by RESHAM
    Replies
    7
    Views
    218

    [SOLVED] Re: Java Compiler

    while ((value = inStream.read()) != -1 || (error = errorStream.read()) != -1) {
    if (value > 0) {
    System.out.print((char) value);
    }
    ...
  3. Thread: Java Compiler

    by RESHAM
    Replies
    7
    Views
    218

    [SOLVED] Re: Java Compiler

    OutStreamAccumulator out = compiler.new OutStreamAccumulator(process.getInputStream());

    getInputStream returns the only input stream connected to the normal output of the subprocess.
    try using...
  4. Replies
    4
    Views
    153

    Re: Need help with this algorithm

    you can also try using hashmap with Integer(0-9) as key and String as value and then store the 10 key value pair as you have specified. also have two arrays key[] and numOfTaps[]. so when you press...
  5. [SOLVED] Re: Program won't go to result after input. Help ASAP please..

    once you take the second input, its overwriting the first input.
    try reading java arrays.
  6. Replies
    5
    Views
    186

    Re: Java MutiThreading Stock

    you are calling the methods on "stock" but it is not refrencing to any object.
    whenever you need to call a method you hav to first create an object and give the refrence to it.
    Stock stock;...
  7. Replies
    2
    Views
    109

    Re: Efficent idea to use on this question...

    you can actually use hashmap
    write a function which returns hashmap
    store your each subject scores in hashmap<K,V> where K is subject name and value is subject score
    and in main function u can get...
Results 1 to 7 of 7