Answer:
Runtime error probably. The program won't make it past the while loop in the code.
Answer:
The answer for the following question is given as:
public static Temperature create(Sensor ob)
{
return new Temperature(ob.getReading());
}
Explanation:
In this we have create a static method of Temperature class which accept a 'Sensor' object and return the new 'Temperature' object that calls the 'getReading()' function This function returns the sensor's current reading.
Import java.util.Scanner;
class hola
{
public static void main(String[]args)
{
Scanner x=new Scanner(System.in);
int a=x.nextInt();
int b;
if(a>20&&a<100)
{
b=a%12;
if(b%2==0){
System.out.print("es par"+b);
}
else{
System.out.print("es impar"+b);
}
}
}
}