List of few of java implementations
MIT : See the LICENSE file.
Index | Task | View Code |
---|---|---|
01 | WAP in java to create a class named FirstProgram which prints "Hello world!" | Code |
02 | WAP in Java to create a class Employe with attributes empid, salary and name of private, type each. Provide a getter and setter method for each, and call those functions from the class names EmpDemo. | Code |
03 | WAP in Java to demonstrate the i/O manipulation using object of scanner class. | Code |
04 | WAP in Java to demonstrate the use of compound operators. | Code |
05 | WAP in Java to take two integers as the command line argument and display their sum. | Code |
06 | WAP in Java to create a class named Employee having attributes name, emp_id and salary, create another class Main which will create the object of Employee and traverse the object to print their values. | Code |
07 | WAP in Java to create a enum Doctors with constructor and use the created enum in the class Main. | Code |
08 | WAP in Java to create a class named Jv which implements a roundMarks() which takes the double array and return the rounded off value in int array | Code |
09 | WAP in Java to create a class Demo which creates an ArrayList, add and remove elements from the created ArrayList | Code |
10 | WAP in Java to create a class Employee with attributes name , emp_id and salary store the objects to and ArrayList | Code |
27 | WAP in java to implement a class named Elections with attributes name and votes, implement methods upVote(), downVote(), and show(), create an object of this file and save the state of the object to the file named "this.txt". | Code |
28 | WAP in Java to define a class Car having attributes name, mileage and price. Create 5 Car objects and write those objects in a file named as "mycar.doc". Write a method public void getCars(double mlg) which displays the name, price and mileage of all the cars having mileage greater than mlg. | Code |
29 | WAP in Java to take input from the user the file/folder name and the name of extention, then delete all the occurences of the given file extention from the given folder including the sub-folders. | Code |
30 | WAP in Java to define an interface named University with a nested class Student, with attributes name, age and ca_marks and a method study() having a local class Evaluation inside it. Define a method double getEvaluationMarks() in which ask the user to enter the total number of questions and toal incorrect answers . Now return the percentage of marks. Create three student and call getEvaluationMarks for those students having highest marks. | Code |
31 | WAP in Java to define an interface Person containing abstract method VoterId getVoterID(). Create a class Employee which inherits Person and contains an inner class VoterId with attributes id and name. Implement the getVoterId method such that it reads the name and automatically assigns a unique id to each Employee Object and return the VoterId object. Create a Main class and create two Employee objects and display their Voter Ids. | Code |
32 | WAP in Java to take two integer as command line argument and display their sum, difference and division values, also implement a scenario to prevent all possible exceptions. | Code |
33 | WAP in Java to create a class name Vehilcle with attributes price, mileage and fuel and a parameterized constructor to initialize all values and two methods getFuel() and addFuel(int var), create a subclass with attributes and car_name and a method to display car name, call all the methods from a class named Demo | Code |
34 | WAP in Java to create a class named CopyCat which implements a method that copies the content of one file to another file | Code |
35 | WAP in Java to show the propogation of exception | Code |
36 | WAP in java to show the concept of 'try' with resource allocation | Code |
37 | WAP in Java to create a class named User which throws a user defined exception called InvalidStringException if the length of string is < 5, also prompt the user to take the inputs till the user enters the correct string. print "String length is less than 5" if the user enters the string with length les than 5. | Code |
38 | WAP in Java to create a generic function which takes the generic type array and returns the minimum value amongst the array to the caller function. | Code |
39 | WAP in Java to create a class ADemo which implements a method showAverage(int [] Arr) and perform the assertion the array is null or the size of array is zero. | Code |
40 | WAP in Java to create a class PI which defines a method called calculateInterest(int amt, double roi, int years) to compute the compound interest, perform assertion in the required scenario. | Code |
41 | WAP in Java to create a class Demo and assign some values to the treeSet of Integer type, and then print the elements using the iterator | Code |
42 | WAP in Java to create a class Gen which defines "int linearSearch(E [] list, E key)" as a generic method which returns the index if the key is present in list else it returns -1 | Code |
43 | WAP in Java to create a class named Student having attributes name, id, and cgpa. Create another class called Demo which creates a TreeSet of Student type which is sorted in the ascending order of their cgpa. | code |
44 | WAP in Java to create a class named Student having attributes name, id, and cgpa. Create another class called Demo which creates a TreeSet of Student type which is sorted in the ascending order of their cgpa then name and then the id | Code |