Description: |
Given a list of integers, find out all the even numbers that exist in the list using Stream functions? |
Code: | ||
|
Output: 10, 8, 98, 32 |
Description: |
Given a list of integers, find out all the even numbers that exist in the list using Stream functions? |
Code: | ||
?
|
Output: 10, 8, 98, 32 |
In this section, we are giving few java interview programs faced by some of my friends. If you come across any questions, post it to me. I can provide solutions.
|
Code: | ||
?
|
Description: |
In this example, we are going to serialize the object of Student class. The writeObject() method of ObjectOutputStream class provides the functionality to serialize the object. We are saving the state of the object in the file named f.txt. |
Code: | ||
?
|
Description: |
Write a sample code to Swapping of two Numbers in java without third variable. |
Code: | ||
?
|
Output: |
Enter x and y no:
10
20
Before Swaping
x=10
y=20
After Swaping
x=20
y=10
|
Description: |
Write a sample code to Palindrome in java. |
Code: | ||
?
|
Output: |
Enter a string to check :
madam
The string is a palindrome.
Enter a string to check :
godblessgovind
The string isn't a palindrome.
|
Description: |
Write a sample code to FizzBuzz Program in Java. |
Code: | ||
?
|
Output: |
1 2 Buzz 4 fizz Buzz 7 8 Buzz fizz 11 Buzz 13 14 fizzBuzz |