Browsing articles tagged with " function"
Dec
13

LOOP in PL/SQL

By admin  //  Oracle  //  View Comments

Syntax:

LOOP

statements

END LOOP;

Example:

DECLARE

cntr NUMBER :=0;

BEGIN

LOOP

cntr :=cntr +1;

IF cntr>100 THEN

Dbms_Output.put_line (cntr);

EXIT;

END IF;

END LOOP;

Sep
30

calculate area of circle using abstract class in JAVA

By admin  //  JAVA  //  View Comments

abstract class shape
{
public abstract void calculateArea();
public void show()
{
System.out.println(“Abstract Class\n”);
}
}

public class circle extends shape
{
int radius;
public circle (int r)
{
radius=r;
}
public void calculateArea()
{
System.out.println(“Calculate Area of Circle class: \n Radius of Circle = 4 \n Formula = PI r square \n Then Area of circle =  ” + 3.14*radius*radius);
}
public static void main(String args[])
{
circle c1=new circle(4);
c1.show();
c1.calculateArea();
}
}

Namaste!

Hello! This is Nirmal Gyanwali, a freelance web developer from Kathmandu, Nepal. I am well versed with Open source CMS and portal frameworks like Joomla!, Wordpress, Drupal. If you're interested, you can contact me at info@nirmal.com.np.
Thanks!

Latest Tweets