Created
October 3, 2022 21:37
-
-
Save rmg007/b8a23eb6a4f57002e269dc762658747a to your computer and use it in GitHub Desktop.
learn and dive deep into Java. Escape Sequences and printf lecture part 2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class Main { | |
| /* | |
| My name is John | |
| I live in france since 2023 | |
| My salary is 45.55555589 | |
| */ | |
| public static void main(String[] args) { | |
| String name = "John"; | |
| int year = 2023; | |
| double salary = 23.4545666; | |
| System.out.printf("My name is %s\nI live in france since %d\nMy salary is %.2f", name, year, salary); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment