0% found this document useful (0 votes)
2 views

class Gv1

The document contains multiple Java classes (Gv1 to Gv10) that define static variables related to various items such as vehicles, clothing, and education. Each class has a main method that prints the details of the respective items, including cost, brand, and other attributes. The classes illustrate object-oriented programming concepts and showcase different types of data associated with each item.

Uploaded by

ANEESH J
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

class Gv1

The document contains multiple Java classes (Gv1 to Gv10) that define static variables related to various items such as vehicles, clothing, and education. Each class has a main method that prints the details of the respective items, including cost, brand, and other attributes. The classes illustrate object-oriented programming concepts and showcase different types of data associated with each item.

Uploaded by

ANEESH J
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

class Gv1

static double bike_cost=134567.89;


static String bike_brand="Kawasaki";
static String bike_color="Blue";
public static void main(String[] args)
{

System.out.println("Bike cost :"+bike_cost);


System.out.println("Bike brand name:"+bike_brand);
System.out.println("Bike Color :"+bike_color);
}
}

class Gv2
{

static double car_cost=500000.00;


static String car_model_name="Mercedes";
static String car_type="Petrol";
public static void main(String[] args)
{

System.out.println("Car cost :"+car_cost);


System.out.println("Car model name:"+car_model_name);
System.out.println("Car Type :"+car_type);
}
}

class Gv3
{

static double school_name=500000.00;


static int school_grade=10;
static int school_strength=120;

public static void main(String[] args)


{

System.out.println("School name :"+school_name);


System.out.println("School grade is :"+school_grade);
System.out.println("School strength is :"+school_strength);
}
}

class Gv4
{

static double tv_cost=10000.00;


static String tv_brand="Huawei";
static String tv_type="LCD";

public static void main(String[] args)


{
System.out.println("TV cost :"+tv_cost);
System.out.println("TV model name:"+tv_brand);
System.out.println("TV Type :"+tv_type);
}
}

class Gv5
{

static double bike_cost=134567.89;


static String bike_brand="Kawasaki";
static String bike_color="Blue";

public static void main(String[] args)


{

System.out.println("Bike cost :"+bike_cost);


System.out.println("Bike brand name:"+bike_brand);
System.out.println("Bike Color :"+bike_color);
}
}

class Gv6
{

static String cloth_color="Red";


static double cloth_cost=8000.00;
static String cloth_size="L";
public static void main(String[] args)
{

System.out.println("Cloth Color :"+cloth_color);


System.out.println("Cloth cost:"+cloth_cost);
System.out.println("Cloth size :"+cloth_size);
}
}

class Gv7
{
static String emp_id="M-38";
static double emp_sal=45800.00;
static int emp_grade=2;
public static void main(String[] args)
{

System.out.println("Employee ID :"+emp_id);
System.out.println("Employee Salary:"+emp_sal);
System.out.println("Employee Grade :"+emp_grade);
}
}
class Gv8
{
static String home_name="Nest Villa";
static double home_cost=5008000.00;
static String home_color="White";

public static void main(String[] args)


{

System.out.println("Home Name :"+home_name);


System.out.println("Home Cost:"+home_cost);
System.out.println("Home Color :"+home_color);
}
}

class Gv9
{ static String laptop_name="Lenovo";
static double laptop_cost=58000.00;
static String laptop_brand="IG6";
public static void main(String[] args)
{

System.out.println("Laptop Name :"+laptop_name);


System.out.println("Laptop Cost:"+laptop_cost);
System.out.println("Laptop Brand :"+laptop_brand);
}
}

class Gv10
{

static String course_name="BE";


static String unvir_name="Huawei";
static double exam_cost=5000.00;
public static void main(String[] args)
{

System.out.println("Course Name :"+course_name);


System.out.println("University name:"+unvir_name);
System.out.println("Exam Cost :"+exam_cost);
}
}

You might also like