Computer Science, asked by AreetraSircar, 30 days ago

How can i write if else statement using string data type in java.

For example: I want to check that whether the user has written good or not. If she has written then it will print correct else it will print wrong.

Please tell how to answer this in java step by step.
Please help if you know correctly.​

Answers

Answered by gaurangrj14
2

Answer:

Example of if statement. public class IfStatementExample { public static void main(String args[]){ int num=70; if( num < 100 ){ /* This println statement will only execute, * if the above condition is true */ System.out.println("number is less than 100"); } } } ...

Example of Nested if statement. ...

Example of if-else statement. mark me in branlist

Similar questions