-
Notifications
You must be signed in to change notification settings - Fork 94
Added java explanatory code #82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Added java code, removed cpp code, removed operators like comma, sizeof, reference and dereference which are not present in java
lessons/operators.md
Outdated
public class Main | ||
{ | ||
public static void main(String[] args) { | ||
char ch = 'a'; | ||
int typecasted_character = (int)'a'; | ||
System.out.println(ch); | ||
System.out.println(typecasted_character); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public class Main | |
{ | |
public static void main(String[] args) { | |
char ch = 'a'; | |
int typecasted_character = (int)'a'; | |
System.out.println(ch); | |
System.out.println(typecasted_character); | |
} | |
} | |
public class Main { | |
public static void main(String[] args) { | |
char ch = 'a'; | |
int typecasted_character = (int) 'a'; | |
System.out.println(ch); | |
System.out.println(typecasted_character); | |
} | |
} |
here also
lessons/operators.md
Outdated
public class Main | ||
{ | ||
public static void main(String[] args) { | ||
int num=15; | ||
String msg = num > 10 | ||
? "Number is greater than 10" | ||
: "Number is less than or equal to 10"; | ||
System.out.println(msg); | ||
} | ||
``` | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public class Main | |
{ | |
public static void main(String[] args) { | |
int num=15; | |
String msg = num > 10 | |
? "Number is greater than 10" | |
: "Number is less than or equal to 10"; | |
System.out.println(msg); | |
} | |
``` | |
} | |
public class Main { | |
public static void main(String[] args) { | |
int num = 15; | |
String msg = num > 10 ? "Number is greater than 10" : "Number is less than or equal to 10"; | |
System.out.println(msg); | |
} | |
} |
Please fix the indentation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please fix the indentation, else everything is great.
👍🏻
indentation resolved Co-authored-by: Utkarsh Mishra <76392681+Utkarsh1504@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Thank you 👍🏻
Fixes #4
Short description of what this resolves:
Improves operators.md with java code and operators
What Changes proposed in this pull request:
Checklist
Notes: