Post History
Java (JDK), 134 123 118 bytes interface M{static void main(String[]a){System.out.print("Hello, "+new java.util.Scanner(System.in).nextLine()+"!");}} Try it online! Golfed 5 bytes thanks to @...
Answer
#3: Post edited
# [Java (JDK)], <s>134</s> 123 bytes- <!-- language-all: lang-java -->
class M{public static void main(String[]a){Scanner s=new Scanner(System.in);System.out.print("Hello, "+s.nextLine()+"!");}}[Try it online!][TIO-ktdo2qtq]- [Java (JDK)]: http://jdk.java.net/
[TIO-ktdo2qtq]: https://tio.run/##LYsxEoIwEAC/cqYiovkAY62FVJSOxQnBOQgXJjlQh@HtkYJqd4vtcMZz1/SJhtEHgW5rMwk5cyxS7TBGKJdxejmqIQrKhtlTAwMSZ5UE4vfjiXqpamS2AeKF7Qf2yqpfFDsYYl3s6icx43ZJpm7WOX8ClUfD9it3YpvpXB2ULtY1pRJDD1cK2Lb2Dw "Java (JDK) – Try It Online"
- # [Java (JDK)], <s>134</s> <s>123</s> 118 bytes
- <!-- language-all: lang-java -->
- interface M{static void main(String[]a){System.out.print("Hello, "+new java.util.Scanner(System.in).nextLine()+"!");}}
- [Try it online!][TIO-kteyuxa6]
- Golfed 5 bytes thanks to [**@user**](https://codegolf.codidact.com/users/53837)'s [advice](https://codegolf.codidact.com/comments/thread/4447#comment-13529).
- [Java (JDK)]: http://jdk.java.net/
- [TIO-kteyuxa6]: https://tio.run/##LcwxDsIwDEDRq4RMiQq5AAeAgU4dEYOVOshp6qDULaCqZw8dWL/0foQFTrEfaiUWLAE8qnadBIS8WjL1agRi00khft4fYNfuOwmOLs/iXnsUo6@YUj4q3TC@VdyHbhZKrvPAjMX8AbF1jB@5EaOxjT5oe962Wlsog7pQgRDwBw "Java (JDK) – Try It Online"
#2: Post edited
# [Java (JDK)], 134 bytes- <!-- language-all: lang-java -->
class M{public static void main(String[]a){Scanner s=new Scanner(System.in);String n=s.nextLine();System.out.print("Hello, "+n+"!");}}[Try it online!][TIO-kt589giz]- [Java (JDK)]: http://jdk.java.net/
[TIO-kt589giz]: https://tio.run/##LYpBDoIwEEWvMrIqor0AYa0LWbE0LkYoZqBMSTughnD2SoKrn/ff63DGc9f0kYbReYFuYz0JWX3MY20xBCiXcXpaqiEIyjazowYGJFaVeOLX/YHpUtXIbDyEgs0b/qSqbxAzaOI031vgImg2H7kRG7W9e@Am0ePmRSVXY607QZJxlhySNF/XGEv0PVzIY9uaHw "Java (JDK) – Try It Online"
- # [Java (JDK)], <s>134</s> 123 bytes
- <!-- language-all: lang-java -->
- class M{public static void main(String[]a){Scanner s=new Scanner(System.in);System.out.print("Hello, "+s.nextLine()+"!");}}
- [Try it online!][TIO-ktdo2qtq]
- [Java (JDK)]: http://jdk.java.net/
- [TIO-ktdo2qtq]: https://tio.run/##LYsxEoIwEAC/cqYiovkAY62FVJSOxQnBOQgXJjlQh@HtkYJqd4vtcMZz1/SJhtEHgW5rMwk5cyxS7TBGKJdxejmqIQrKhtlTAwMSZ5UE4vfjiXqpamS2AeKF7Qf2yqpfFDsYYl3s6icx43ZJpm7WOX8ClUfD9it3YpvpXB2ULtY1pRJDD1cK2Lb2Dw "Java (JDK) – Try It Online"
#1: Initial revision
# [Java (JDK)], 134 bytes <!-- language-all: lang-java --> class M{public static void main(String[]a){Scanner s=new Scanner(System.in);String n=s.nextLine();System.out.print("Hello, "+n+"!");}} [Try it online!][TIO-kt589giz] [Java (JDK)]: http://jdk.java.net/ [TIO-kt589giz]: https://tio.run/##LYpBDoIwEEWvMrIqor0AYa0LWbE0LkYoZqBMSTughnD2SoKrn/ff63DGc9f0kYbReYFuYz0JWX3MY20xBCiXcXpaqiEIyjazowYGJFaVeOLX/YHpUtXIbDyEgs0b/qSqbxAzaOI031vgImg2H7kRG7W9e@Am0ePmRSVXY607QZJxlhySNF/XGEv0PVzIY9uaHw "Java (JDK) – Try It Online"