Skip to content

latenightcoder-git/java-codes

Repository files navigation

java-codes

I am learning Java

Assignment Questions and Solutions

Assignment Date : 06/01/2025

Submission Date : 08/01/2025

Teacher - Mr . Amitava Chattopadhyay


Questions:

Question 1 : WAP to print 1-7 but in case of 5 and 3, You need to print "I am 5" and "I am 3".

Question 2: WAP to take your name from cmd and count the consonents and vowels in it.

Question 3 : WAP to find largest of 2 given number and then compare the sum of them with another given number and print the smallest.

Question 4 : WAP to print 20 to 4 using a while loop.

Question 5 : WAP to print sum of even numbers from 1 to 20.

Question 6 : WAP to develop a static method which will make a user login by implementing... a> The user name must be either Ankan or Souparna b> the password must be Madhu or Trisha Implement above by switch-case only .

Question 7 : WAP to implement a switch case in java that will take 3 strings and if their length is > 3 , then it should greet the user. Remember to calculate the length of strings in another static method.

Question 8 : WAP to print 1-10 using for loop , while loop and do-while loop in 3 different static methods. Call them from main and run.

Question 9 : Write a static method to find factorial of a number and call from main.

Question 10 : Write a static method to find if a number is prime or not and then check whether its an odd number. Call from main.


About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages