What is static modifier?



What is static modifier?..

Answer / Mohd Adil Abbas

The static modifier in Java makes a variable or method belong to the class level instead of the object level. Static variables are shared among all instances of the class, and they are initialized only once.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More OOPS Interview Questions

Can an interface inherit a class?

1 Answers  


Write an operator overloading program to Overload ‘>’ operator so as to find greater among two instances of the class.

1 Answers  


why oops need in programming

7 Answers   TCS,


3. Differentiate verification and validation.

1 Answers  


#include <string.h> #include <stdio.h> #include <stdlib.h> #include<conio.h> void insert(char *items, int count); int main(void) { char s[255]; printf("Enter a string:"); gets(s); insert(s, strlen(s)); printf("The sorted string is: %s.\n", s); getch(); return 0; } void insert(char *items, int count) { register int a, b; char t; for(a=1; a < count; ++a) { t = items[a]; for(b=a-1; (b >= 0) && (t < items[b]); b--) items[b+1] = items[b]; items[b+1] = t; } } design an algorithm for Insertion Sort

1 Answers  


//what is wrong with the programme?? #include<iostream.h> template <class first> class dd { first i; public: void set(); void print(); }; void dd< first>:: set() { cin>>i; } void dd< first>::print() { cout<<"\n"<<i; } void main() { dd <char>g; g.set(); g.print(); }

1 Answers  


diff between Abstract class Interfaces?

4 Answers  


what is abstract class ? when is used in real time ? give a exp

5 Answers  


Write pseudo code for push in a stack?

2 Answers   emc2,


Which language is pure oop?

1 Answers  


Can private class be inherited?

1 Answers  


how to swap the variables without using temp and operators

1 Answers  


Categories