summary refs log tree commit diff stats
path: root/java/index.typ
diff options
context:
space:
mode:
authorSudipto Mallick <smlckz@termux-alpine>2024-01-25 05:50:05 +0000
committerSudipto Mallick <smlckz@termux-alpine>2024-01-25 05:50:05 +0000
commit13f9553a26a51b95ab194e5328ad302b35d7b118 (patch)
tree8cc94ea3ae2baac3335bd8471196f90a28a2a066 /java/index.typ
parenta5afdcfa7165e100042f03de1b3f7a601389776f (diff)
downloadzadania-13f9553a26a51b95ab194e5328ad302b35d7b118.tar.gz
Complete Java assignments
Diffstat (limited to 'java/index.typ')
-rw-r--r--java/index.typ2
1 files changed, 1 insertions, 1 deletions
diff --git a/java/index.typ b/java/index.typ
index b9a4907..e2caab9 100644
--- a/java/index.typ
+++ b/java/index.typ
@@ -47,7 +47,7 @@
 + Write a program to create a class containing an inner class to show that inner class can use members of outer class directly, but the outer class can use members of inner class only through its objects. Check the name of the inner class file created when it was compiled.
 + Create two interfaces, each with two methods. Inherit a new interface from the two, adding a new method. Create a class by implementing the new interface and also inheriting a concrete class. In the `main()` method, create an object of the derived class and call these methods [do all without package statement].
 + Create an Interface. Create two sub-classes implementing the interface. Show the functionalities of runtime polymorphism / dynamic method dispatch using them.
-5. Create a class with variable(s) and method(s) (all will be default accessed) under package `pOne`. Now create a class under package `pTwo`, which is subclass of firstly created class. In the method here (_i.e._ class of `pTwo`) call variable(s) and method(s) of previous class (_i.e._ class of `pOne`). If errors come, rectify them. Now from `main()` (under working directory) access members of the second class.
++ Create a class with variable(s) and method(s) (all will be default accessed) under package `pOne`. Now create a class under package `pTwo`, which is subclass of firstly created class. In the method here (_i.e._ class of `pTwo`) call variable(s) and method(s) of previous class (_i.e._ class of `pOne`). If errors come, rectify them. Now from `main()` (under working directory) access members of the second class.
 + Create an interface containing three methods, in a package `pkgOne`. Implement the interface from a class under package `pkgTwo`. From `main()`, under working directory, create object of the class and call methods of interface.
 + Write a program to take an integer number from the user. If the number is less then zero then throw a custom exception. Also, catch the exception when other datatypes except integers are given. 
 + Write a program in Java to create three threads printing 1 to 100. Implement the program using both inheriting Thread class and implementing Runnable interface.