{
Int the Name;
int weight;
Int height;
Void height () {
Int height=180;
System. The out. Println (height);
}
Void weight () {
Int weight=170;
System. The out. Println (weight);
}
}
The class demoTrainee
{
Public static void main (String args []);
Trainee me=new Trainee ();
Me. Weight ();
}
CodePudding user response:
Class demoTrainee class is behind the main function of the curly braces, not a semicolonCodePudding user response:
package com. Yiweikeji. Cif. Util.
The class Trainee
{
Int the Name;
int weight;
Int height;
Void height () {
Int height=180;
System. The out. Println (height);
}
Void weight () {
Int weight=170;
System. The out. Println (weight);
}
Public static void main (String args []) {
Trainee me=new Trainee ();
Me. Weight ();
}}