java file class
import java.io.File;
File names and Class names in Java
class Triangle {
int x, y;
void printArea()
{
System.out.println("Area of triangle is: " + x * y / 2);
}
}
class Demo {
public static void main(String args[])
{
Triangle t = new Triangle();
t.x = 10;
t.y = 13;
t.printArea();
}
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us