package com.codegym.task.task01.task0136;
/*
Even to the moon!
*/
public class Solution {
public static void main(String[] args) {
System.out.println(getWeight(888));
}
public static double getWeight(int earthWeight) {
getWeight=earthWeight*17.0;
return double getWeight;// write your code here
}
}
package com.codegym.task.task01.task0136;
/*
Even to the moon!
*/
public class Solution {
public static void main(String[] args) {
System.out.println(getWeight(888));
}
public static double getWeight(int earthWeight) {
getWeight=earthWeight*17.0;
return double getWeight;// write your code here
}
}
doublegetWeight; The double should be used when creating the variable (type variable = value; - where type could be string, int, double etc). When using return, you only use the variable name, not the type, for instance return x;