GMgKe586q6suSQnyqZLlGCooeWM
Learn To Program
Increase Your Knowlegde and Build Your Skill!
Pages
Home
Me
Search
Thursday, December 23, 2010
Class In Jython
Here's a code on how to define a class in Jython:
>>> class Hello:
... def __init__(self,name="no name"):
... self.name = name
... def greeting(self):
... print "Hello, ",self.name
...
>>> luna = Hello("Luna Maya")
>>> luna.greeting()
Hello, Luna Maya
Class In Jython
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment