# My young friend

• 1
• Locked
It's currently 3126. My friend was born 8 years ago. Write a program that displays my friend's birth year.
You can't complete this task, because you're not signed in.
Hasan Özyer
Level 1 , Turkey
9 May, 09:06
public class Solution { public static void main(String[] args) { //write your code here int currentYear = 3126; int friendAge = 8; int friendBirth = currentYear - friendAge; System.out.println(friendBirth); } }
Anonymous #11327312
Level 1 , Danville, United States
17 April, 23:59
int currnetYear = 3126; int friendAge = 8; int friendBirth = currnetYear - friendAge; System.out.println("You friend was born in "+friendBirth);
Anonymous #11329842
Level 3 , National City, United States
12 April, 22:06
int year = 3126; int age = 8; System.out.println(year-age);
Dx Upscale
Level 2
3 April, 17:29
Why is it declining; public static void main(String[] args) { int a; int a = 3126-8; System.out.println("Your friend's birth year is: " "+ a"; } }
Allan Gilbert
Level 2 , Нью Йорк, India
23 March, 14:38
System.out.println(3126 - 8);
Misho Misho
Level 1 , Georgia
7 January, 08:19
System.out.println("3118");
30 December 2022, 02:45
you must try to currency 3126 - 8, just it
Phu Tran
Level 2 , Viet Nam
29 November 2022, 07:41
What's conditions ?
Michaela Hrbková
Level 3 , Czech Republic
9 August 2022, 11:59
why are there no int?
Anonymous #11069021
Level 1 , United States
26 August 2022, 05:23
Same question 🤔
Anonymous #11274451
Level 2 , United States of America, United States
22 March, 19:08
I'm just starting but i think because System.out.println("3118") actually displays 3118 I think ito use int, it'd have to be as a variable.
Anonymous #11038721