Java Class Member

Table of Contents

Class Member

Class variables and methods are known as Class members. Variables hold the state of program and methods operate on these states.

package C1;

public class Animal {
	String animalName;                 // Variable to store Animal Name

	public void setAnimalName(String name) {      // Method to set Animal Name
		animalName = name;
	}

}

For Your kind attention Please –

If you are preparing for Java Certificate exam, You can take a Practice Test by clicking here. Practice Test have real exam questions. Thus it will ensure that you pass your Certificate Exam without any surprise.

  If you want to crack an interview for the Java Developer role, a demo interview will fortify your chances. Thus, Book an interview preparation session.

Workspace in use - Eclipse Error

Leave a Comment

आपका ईमेल पता प्रकाशित नहीं किया जाएगा.

Shopping Cart