Cool............ thanks.....
Type: Posts; User: rohan22
Cool............ thanks.....
Yes i got to know that m is int and not static int in netbeans debugger when i review the contents of m.
But my question was can static methods have non static variables also.And yes i can...
Yes I have tried and its working Fine.Try the below code:
class D {
int k;
void fill(int g) {
k = g;
System.out.println("k is " + k);
I think i am very close to solving it.Just tell me one thing.Now(below i have written a short code about
the scenario) suppose if i have a static method X(). And in that if i declare a variable...
Hey....For my first program, to access Stack3 class i have created an object called stackcopy and accessing an nonstatic method push(int ele) from main() of Doubt1 class.And in my second program...
Hello,
Below is my code for Stack implementation.
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package doubt1;