logo

CuriousTab

CuriousTab

Discussion


Home Interview Technology Comments

  • Question
  • Why static methods cannot access non static variables or methods?


  • Correct Answer
  • A static method cannot access non static variables or methods because static methods doesnt need the object to be accessed So if a static method has non static variables or non static methods which has instantiated variables they will no be intialized since the object is not created and this could result in an error 


  • Technology problems


    Search Results


    • 1. Explain static and dynamic memory allocation with an example each.
    • Discuss
    • 2. What is the difference between Tags and HTML Elements ?
    • Discuss
    • 3. How can you make sure the web application is fit for release ?
    • Discuss
    • 4. What is the importance of finally block in exception handling ?
    • Discuss
    • 5. Should a main() method be compulsorily declared in all java classes?
    • Discuss
    • 6. What is String Args in Java?
    • Discuss
    • 7. The syntax of capture events method for document object is..
    • Discuss
    • 8. What is the role of the JIT compiler in .NET Framework?
    • Discuss
    • 9. Which of the following gives the memory address of the first element in array?

    • Options
    • A. array[0];
    • B. array[1];
    • C. array(2);
    • D. array;
    • Discuss
    • 10. What JSON framework is supported by iOS (iPhone OS) ?
    • Discuss


    Comments

    There are no comments.

Enter a new Comment