Wednesday, May 23, 2018

Technical Tip #11 - Technical Tip of the day....by JavaExpertHelp – www.JavaByKiran.com


T11: Knowledge Tip Of The Day..
class
Class can be defined as a blueprint that describe the behaviors /states of a particular entity. A class defines new data type. Once defined this new type can be used to create object of that type. Object is an instance of class. You may also call it as physical existence of a logical template class.
A class is declared using class keyword. A class contain both data and code that operate on that data. The data or variables defined within a class are called instance variables and the code that operates on this data is known as methods.
Rules for Java Class
• A class can have only public or default(no modifier) access specifier.
• It can be either abstract, final or concrete (normal class).
• It must have the class keyword, and class must be followed by a legal identifier.
• It may optionally extend one parent class. By default, it will extend java.lang.Object.
• It may optionally implement any number of comma-separated interfaces.
• The class's variables and methods are declared within a set of curly braces {}.
• Each .java source file may contain only one public class. A source file may contain any number of default visible classes.
• Finally, the source file name must match the public class name and it must have a .java suffix.
Example:
Student is a class and student's name, roll number, age will be its property and accept and display is its operations.
class Student
{
String name;
int rollno;
int age;
public void accept()
{
}
public void display()
{
}
}




Regards,
javabykiranhr1@gmail.com
#Java #Learn #Upgrade #Training #Classes #OnlineLecture #OnlineVideos #Pune
#Call Now to book your seat to JOIN Java Training @ 7219474925, eMail @ javabykiranhr1@gmail.com
#Visit us @ www.JavaByKiran.com
#Java #J2EE
#Core +#Advance + #Struts +#Hibernate + #Spring + #REST + #OCJP + #OCWCD + #Maven + #Junit + #Jquery #Ajax + #XML
#Spring Boot + CI and many more ..
#Selenium
#Complete #Java + #Selenium + #TestNg + #Jenkin + #Webdriver + #Cucumber +#Maven + #DataProvider + #Keyword + #Hybrid + #POM End to End integration #Jenkin #Maven #Testng and many more ..
#JavabyKiran #Expert #Training #BestInstitute #Java #Python #Selenium #Freshers #Professionals #IT #Software #Career #Interview #Jobs#Jobopening  #BestTrainingInstituteinPune #ITCourses  #OnlineVideo  #Pune

No comments:

Post a Comment