tag:blogger.com,1999:blog-7258332205026269340.post5875209516568005240..comments2024-02-21T01:43:44.367-08:00Comments on Selenium-By-Arun: 61. 'class' conceptPriyanka Motoorihttp://www.blogger.com/profile/04643338373711611455noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-7258332205026269340.post-61046004198612594872015-07-20T22:32:23.578-07:002015-07-20T22:32:23.578-07:00There are two types of variables.
1. Local Variab...There are two types of variables. <br />1. Local Variables - Variables declared inside the methods (These variables can only be accessible inside the method where they are declared)<br />2. Global Variables - Variables declared inside the Class but outside the methods (The variables can be accessible by all the methods in the Class)<br /><br />Global variables are used when we need to use the Arun Motoorihttps://www.blogger.com/profile/18156045285817519369noreply@blogger.comtag:blogger.com,1999:blog-7258332205026269340.post-7099038724314965172015-07-20T22:28:07.221-07:002015-07-20T22:28:07.221-07:00Hi,
class Box
{
double width;
...Hi,<br /><br /> class Box<br /> {<br /> double width;<br /> double height;<br /> double depth;<br /> <br /> public static void main(String args[])<br /> {<br /> double volume;<br /> volume = width*height*depth;<br /> System.out.println("The volume of the Box is "+volume);<br /> } <br /> <br />Anonymoushttps://www.blogger.com/profile/07776375095770315132noreply@blogger.com