Search:

Type: Posts; User: Kartik V

Search: Search took 0.29 seconds.

  1. Re: Hi guys, can any one tell what's wrong with my code?This is about stack as arrays and this is based on bluej environment

    2572
    Sorry for not being clear.The 'global' variable i was referring to was 'max'. If you see the output snapshot, when i call the Push() method, max's value gets changed to zero, even though i...
  2. Re: Hi guys, can any one tell what's wrong with my code?This is about stack as arrays and this is based on bluej environment

    how do i make it final? i have to accept the max value in the main method, and after doing dat how shall i make it final? Btw, can u tell me why does the global variable's value change in the other...
  3. Re: Hi guys, can any one tell what's wrong with my code?This is about stack as arrays and this is based on bluej environment

    Well,
    this is a stack as an array program.When i call the push function for the first time, the 'max' value gets changed to zero, even though its a global variable, and i accept its value from the...
  4. Hi guys, can any one tell what's wrong with my code?This is about stack as arrays and this is based on bluej environment

    import java.io.*;
    public class StackImplementation
    {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    int max;
    int top;
    int stack[];

    public...
Results 1 to 4 of 4