Сумка, которая перевернула жизнь: случайность после разрыва
Мария шла домой с небольшого собрания подруг в уютном кафе. Подруги, у каждой своя семья, разошлись пораньше. Её личную жизнь никто не трогал — недавно она пережила тяжёлый развод. Хорошо хоть детей не было…
Дорога лежала через тихий парк, почти пустынный в этот час. Сумерки ещё не сгустились, фонари мягко освещали дорожку. Внезапно за спиной раз# Java-Basic-Programs
1. Write a program to display any message:
2. Write a Java program to display default value of all primitive data type of Java
3. Write a program to check two strings are equal or not.
4. Write a program to find the sum of two numbers.
5. Write a program to find out the perimeter of a rectangle where length and breadth are to be input by user.
6. Write a program to find perimeter of square.
7. Write a program to find area of circle.
8. Write a program to swap two numbers (without using third variable)
9. Write a program to convert temperature from Fahrenheit to Celsius. (Input Fahrenheit from user).
10. Write a program to find the result of following expression. (Assume a = 10, b = 5)
i) (a << 2) + (b >> 2)
ii) (a) || (b > 0)
iii) (a + b ∗100) / 10
iv) a & b
11. Write a program to find the greatest among three numbers.
12. Write a program to find smallest among three numbers.
13. Write a program to check whether a number is negative, positive or zero.
14. Write a program to check whether a number is even or odd.
15. Write a program to print 1 to 10 using for loop.
16. Write a program to find the sum of 1 to 10 numbers using while loop.
17. Write a program to find factorial of any number.
18. Write a program to find the Fibonacci series up to given number.
19. Write a program on array to find the greatest elements among all elements.
20. Write a program on array to find the sum of elements of array.
21. Write a program to print elements of array in reverse order.
22. Write a program to Sort Numeric Array In Ascending Order.
23. Write a program to Sort Numeric Array In Descending Order.
24. Write a program to left rotate the elements of an array.
25. Write a program to right rotate the elements of an array.
26. Write a program to copy all elements of one array into another array.
27. Write a program to print the elements of an array present on even position.
28. Write a program to print the elements of an array present on odd position.
29. Write a program to print the largest element in an array.
30. Write a program to print the smallest element in an array.
31. Write a program to demonstrate static variable.
32. Write a program to demonstrate use of this keyword.
33. Write a program to demonstrate default constructor.
34. Write a program to demonstrate parameterized constructor.
35. Write a program to demonstrate single inheritance.
36. Write a program to demonstrate method overloading.
37. Write a program to demonstrate method overriding.
38. Write a program to demonstrate multilevel inheritance.
39. Write a program to demonstrate hierarchical inheritance..
40. Write a program to demonstrate super keyword.
41. Write a program to print the names of students by creating a Student class. If no name is passed while creating an object of Student class, then the name should be “Unknown”, otherwise the name should be equal to the String value passed while creating on object of Student class.
42. Write a program to print the area and perimeter of a triangle having sides of 3, 4 and 5units by creating a class named ‘Triangle’ without any parameter in its constructor.
43. Write a program to print the area of two rectangles having sides (4,5) and (5,8) respectively by creating a class named ‘Rectangle’ with a method named ‘Area’ which returns the area and length and breadth passed as parameters to its constructor.
44. Write a program to print the area of a rectangle by creating a class named ‘Area’ taking the values of its length and breadth as parameters of its constructor and having a method named ‘returnArea’ which returns the area of the rectangle. Length and breadth of rectangle are entered through keyboard.
45. Write a program to demonstrate nested try block.
46. Write a program to demonstrate NullPointerException.
47. Write a program to demonstrate ArrayIndexOutOfBoundException.
48. Write a program to create interfaces with static final variable,abstract method and implementation for that method.
49. Write a program to create interface above created interface.
50. Write a program to implement the concept of threading by extending Thread Class.
51. Write a program to implement the concept of threading by implementing Runnable interface.
52. Write a program to implement sleep(), join() and isAlive() in Multi Threading concept.
53. Write a program to demonstrate priorities among multiple threads.
54. Write a program to demonstrate thread synchronization.
55. Write a program to implement the concepts of file handling that includes the operations like creating, writing, reading and deleting.
56. Write a program that will count the number of characters, words and lines in a file. Words are separated by whitespace character. Lines are separated by ‘\n’ character
57. Write a program to read data from properties file.
