Monthly Archives: August 2017

Java Programming: Experiment 1 (codes)

click to download SE IT/ Sem 3/ Rev 2016/ Java Programming/ Experiment 1 (codes) (rar file)

i) Write a Java program to understand how to accept input using Scanner or BufferedReader and print output using System.out.println statement. (,
ii) Write a Java program to display the default value of all primitive data types
in Java. (
iii) Write a Java program that prints all real solutions to the quadratic equation
ax2+bx+c = 0. Read in a, b, c and use the quadratic formula. If the discriminate b2-
4ac is negative, display a message stating that there are no real solutions. (
iv) Write a java program to test whether string is palindrome or not (
v) Write a java program to count number of alphabets, digits, special symbols,
blank spaces and words from the given sentence. (
vi) Write a java program to count number of vowels and consonants from the given
strings. (
vii) Write a Menu driven program in java to implement simple banking application. Application should read the customer name, account number, initial balance, rate of interest, contact number and address field etc. Application should have following
1. createAccount()
2. deposit()
3. withdraw()
4. computeInterest()
5. displayBalance() (
viii) Write a menu driven Java program which will read a number and should implement the following methods
1. factorial()
2. reverse()
3. testArmstrong()
4. testPalindrome()
5. testPrime()
6. fibonacciSeries() (
ix) Write a Java program to demonstrate Method overloading. (