Translate

Tuesday 5 October 2021

Object Oriented Programming Classes Fields Local Variables in groovy Scripting groovy training telugu 35

 Watch This Video

https://youtu.be/A9mtl7GDZXU


---------------------------------------------------------------------------------------------------------------


class Person{
String firstName,lastName
def dob
//private |  protected |public
protected String f1,f2,f3
private Date createdOn= new Date()


static welcomeMsg="Hello"

public static final String WELCOME_MSG="HELLO"

}
//LOCAL VARIABLES
def foo(){
String msg ="Hello"
String firstName="Dan"
println"$msg, $firstName"
}
}

def Person =new Person()

println Person.foo()
 

No comments:

Post a Comment

Note: only a member of this blog may post a comment.