0
public class Program { public static void main(String[] args) { int a=5; int b=2; int f=+a+b; System.out.pri
What problem can't print f https://code.sololearn.com/cWmN6V2eN4rn/?ref=app
3 ответов
0
And you can remove + infront of a+b if you want because it do nothing anyway
0
class MNOP extends ABCD
{ int x = 30; static int y = 40; public String getName()
{ return "MNOP"; } }
public static void main(String[] args) {
System.out.println(new MNOP().x + ", " + new MNOP().y);
ABCD a = new MNOP(); System.out.println(a.x); // 10 System.out.println(a.y); // 20 System.out.println(a.getName()); // MNOP }
How to access parent class getname method
What happen if do downcasting