>
static variable and methods tips in java
Welcome, Guest

by guest on Friday, 21 November 2008
static variable and methods tips in java


static method and variable tips in java 1: static method can not call non-static method or variable directly 2: static method can call the non-static method or variable using object type of the class. 3: non static method can call static method or variable directly 4: static method are invoked first and it maintain only one copy as the static method are not associated with any object type so it does not support the this reference. static method or variable can be invoked by following steps: 1: static method invocation using class name System.out.println(classname.methodname) or System.out.println(hello.showmessage()) // where showmessage is the static method and hello is class static variable invocation using class name System.out.println(classname.variablename) or System.out.println(hello.counter) //where counter is static variable and hello is class 2: static method or variable invocation directly static method can be invoked directly System.out.println(counter); //where counter is the static variable System.out.println(showmessage()); //where showmessage is the static method 3: static mehtod or variable invocation by object type of any class suppose obj is an object type of the class System.out.println(obj.counter); //where counter is the static variable System.out.println(obj.showmessage); //where showmessage is the static method



Blogger Image
My Blog Title

Product Engineering, software engineering company, Product Development, Product Migration, Product Re-engineering, Product Maintenance, Product Testing Commercial Application Development, Business Software development, commercial software for startups, Application Support and Maintenance, software testing Product Maintenance, Outsource product maintenance, product support and maintenance Product Migration, Product Re-engineering, product re-engineering services Product Research, Product Engineering, UI Prototyping Services Software Testing Services, Quality Assurance services, professional software testers, Load Testing, Functional Testing, Cross Platform, Browser Testing, Test Automation, Testing Tools, software quality analysis Functional Testing Services, software quality analysis, Software Testing Services, Application Testing Services, Functional Testing Types Automated Testing, Automated Testing Services, automation testing, test script development, Automation Test Tools, outsource automation testing Load Testing, Performance Testing Services, Load Testing Tools Offshore Software Development, Outsource software services, offshore outsourcing services, offshore software development services, IT outsourcing services, software quality assurance services, Offshore IT services, Custom Application Development Services, Offshore Product Engineering Benefits of IT Outsourcing, Offshore Software Development companies, offshore software development firms Outsource planning, IT outsourcing, IT development services, offshore IT companies, offshore software development Offshore Software Development, Outsource software services, offshore outsourcing services, offshore software development services, IT outsourcing services, software quality assurance services, Offshore IT services, Custom Application Development Services, Offshore Product Engineering Offshore Software Development, Outsource software services, offshore outsourcing services, offshore software development services, IT outsourcing services, software quality assurance services, Offshore IT services, Custom Application Development Services, Offshore Product Engineering