Java: Java Programming For Beginners a simple Start To Java Programming (Written By a software Engineer)


Download 0.82 Mb.
Pdf ko'rish
bet2/95
Sana09.01.2022
Hajmi0.82 Mb.
#261112
1   2   3   4   5   6   7   8   9   ...   95
Bog'liq
Java Programming For Beginners - A Simple Start to Java Programming ( PDFDrive )

Java - Basic Syntax
A basic Java program can be broken down into several constructs and elements. Typically,
it can be characterized as a collection of objects, which communicate with each other by
calling each other’s routines. The basic definitions of objects and classes are given below:
Class
A class can be described as a blueprint that portrays the practices/expresses all the
behaviors and states of its objects.
Object
Objects  are  characterized  by  two  components  namely,  methods  and  attributes  or
variables.  For  instance,  if  you  consider  the  example  of  a  puppy,  then  it  has  the
following  attributes  or  states:  name,  color  and  breed.  In  addition,  it  also  has  the
following  behaviours,  which  include  woofing,  wagging  and  consuming.  Any
object is nothing but an instance of a class.
Instance Variables
Each  object  has  its  set  of  variables.  An  object’s  state  is  made  by  the  qualities
alloted to these variables during program execution.
Methods
A  method  is  the  definition  of  a  method.  Moreover,  a  class  can  contain  numerous
methods.  It  is  in  these  methods  that  behaviours  like  where  the  rationales  are
composed, information is controlled and all the activities are executed.

Download 0.82 Mb.

Do'stlaringiz bilan baham:
1   2   3   4   5   6   7   8   9   ...   95




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling