The document outlines a series of Java programming tasks designed to teach various concepts, including basic arithmetic operations, data structures, object-oriented programming, exception handling, file I/O, and multithreading. Each task focuses on a specific programming principle, such as constructors, method overloading, and inter-thread communication. The exercises range from simple calculations to more complex implementations involving user-defined exceptions and synchronization.
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
4 views
Java Record 1
The document outlines a series of Java programming tasks designed to teach various concepts, including basic arithmetic operations, data structures, object-oriented programming, exception handling, file I/O, and multithreading. Each task focuses on a specific programming principle, such as constructors, method overloading, and inter-thread communication. The exercises range from simple calculations to more complex implementations involving user-defined exceptions and synchronization.
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1
Java record
1. Write a program to find sum and average of students grades.
2. Write a program to find sum of n factorials. 3. write a program to find sum and average of array elements. 4. write a program to find sum of 2 matrices. 5. Demonstrate a program to understand jagged array concept. 6. Write a java program to understand constructors and toString() method? 7. Write a java program to understand setter() and getter() methods? 8. Write a java program to understand the concept of method overloading and var args. 9. Write a java program to demonstrate various members of the class with a suitable example. 10. Write a java program to check whether the given string is palindrome or not? 11. Write a java program to print all indices of word in a line? 12. Write a java program to convert odd places of a String into uppercase? 13. Write a java program to split a string and find the Key value? 14. Write a java program to remove trailing and leading spaces and find the last index of word and find its length? 15. Write a program for division of 2 command line arguments and handle different types of exceptions. 16. Demonstrate a program to understand class and its objects . 17. Write a program to find sum of the digits . Use throws exception and handle in main 18. Write a program to understand abstract class 19. Write a program to understand interface IStack with abstract methods 20. Write a program to understand interface Course with abstract methods 21. Write a program to understand packages. 22. Write a program to create a user defined exception invalidageexception in a voting application. 23. Write a program to understand the concept of binaryio using fileinputstream and fileoutputstream 24. Write a program to copy one file into another file using binaryio 25. Write a program using frames to read the input(String) from a text box on button click covert the input into uppercase and write it to another text box . 26. Write a program to understand binary io using data input stream and data output stream. 27. Demonstrate the use of join method using threads. 28. Explain the creation of thread using thread class and runnable interface . 29. Write a program to realise concept of serialisation and deserialisation. 30. Write a program to know the importance of character io using file reader and file writer . 31. Demonstrate the use of synchronized keyword. 32. Write a program to understand the concept of Inter Thread Communication using producer consumer problem. 33. Write a program to run multiple tasks using Executor Sevice.
1. What does it mean to inherit a class? Mark for Review (1) Points The subclass (or child class) gains access to any non-private methods and variables of the superclass (or parent class). (*) The access specifier has been set to private. A way of organizing the hierarchy of classes. Extending a method from a superclass. Correct 2. Which is the most accurate description of the code reuse philosophy? Mark for Review (1) Points A programming philosophy that promotes stealing your classmates' code. A programming philosophy that promotes having no concern about the security of code. A programming philosophy that promotes protecting data and hiding implementation in order to preserve the integrity of data and methods. A programming philosophy that promotes simpler, more efficient coding by using existing code for new applications