Mock Test-1
-----------------------------------------------------------------------------------------------------------------------------
1 (a) Write a program that reads 10 integers between 1 and 100 and counts the occurrences of each. Assume the input ends with 0. [10 Marks]
OR
(b) (i) Write a program to sum all the elements of an double type array containing 10 elements. [5 Marks]
(ii) Write a program in which define a method to convert an array of double values into array of int values.Invoke that method from the main() method for displaying the output. [5 Marks]
2 (a) Create a class Employee with properties name, salary, department and age. Create method read() in Employee class to read these properties from keyboard and display() method to display these properties. Create another class TestMyObject with main method to invoke read() and display() methods. [10 Marks]
OR
(b) (i) Java is platform independent, Justify the statement and how the platform independence is achieved? [5 Marks]
(ii) Write a program to demonstrate the use of any 5 methods of String class. [5 Marks]
3 (a) What do you mean by Nested class in Java? Differentiate between the Inner class and Local class in java with an appropriate example. [10 Marks]
OR
(b)(i) Write a program to define two interfaces X and Y each having a default method and an abstract method. Now define a class Test which inherits both X and Y and override the abstract method of X but not of Y.
Create a class MyClass which inherits Test and in main method create the object of MyClass and invoke all the methods. [5 Marks]
(ii) Define Functional Interface and Lambda Expressions in Java with a suitable example. [5 Marks]
4 (a) Write a program to define a custom exception InvalidStringException such that it displays the message "String is not accepted" when message is printed. Create a class TestString which reads a String at run-time and if the String is having less than 6 characters then throw the InvalidStringException and display the message in catch block. [10 Marks]
OR
(b)(i) Differentiate throw and throws exception handling with java code in detail. [5 Marks]
(ii) Write a program to create a class named “Vehicle” having attributes name, mileage and price and a parameterized constructor to initialize all the attributes. Vehicle must contain a method public int getPrice() to return the price of the vehicle.
Create 3 Vehicle objects and write them in a file named “record.doc”. Write a method to display the name of the Vehicle with minimum price. (Use ObjectOutputStream) [5 Marks]
5 (a) Write a program to create two arraylists containing "George","Jim", "John", "Blake", "Kevin", "Michael" and "George","Katie", "Kevin", "Michelle", "Ryan" respectively and find their union, difference, and intersection using appropriate methods of ArrayList class. [10 Marks]
OR
(b)(i) What do you mean by Generics? Write a program to create a generic class and instantiate it. [5 Marks]
(ii) Differentiate between the iterator and list iterator using an appropriate example. [5 Marks]
-----------------------------------------------------------------------------------------------------------------------------
Hello Everybody,
ReplyDeleteMy name is Mrs Sharon Sim. I live in Singapore and i am a happy woman today? and i told my self that any lender that rescue my family from our poor situation, i will refer any person that is looking for loan to him, he gave me happiness to me and my family, i was in need of a loan of S$250,000.00 to start my life all over as i am a single mother with 3 kids I met this honest and GOD fearing man loan lender that help me with a loan of S$250,000.00 SG. Dollar, he is a GOD fearing man, if you are in need of loan and you will pay back the loan please contact him tell him that is Mrs Sharon, that refer you to him. contact Dr Purva Pius,via email:(urgentloan22@gmail.com) Thank you.
Thanks a lot very much for the high quality and results-oriented help. I won’t think twice to endorse your blog post to anybody who wants and needs support about this area.
ReplyDeleteDigital Marketing Training in Bangalore
I found your blog while searching for the updates, I am happy to be here. Very useful content and also easily understandable providing.. Believe me I did wrote an post about tutorials for beginners with reference of your blog.
ReplyDeleteClick here:
python training in chennai
Click here:
python training in tambaram
Nice tutorial. Thanks for sharing the valuable information. it’s really helpful. Who want to learn this blog most helpful. Keep sharing on updated tutorials…
ReplyDeleteAWS Training in chennai
AWS Training in bangalore
It's interesting that many of the bloggers to helped clarify a few things for me as well as giving.Most of ideas can be nice content.The people to give them a good shake to get your point and across the command
ReplyDeleteBlue Prism Training in Pune
Blueprism training in tambaram
Blueprism training in annanagar
I found your blog while searching for the updates, I am happy to be here. Very useful content and also easily understandable providing.. Believe me I did wrote an post about tutorials for beginners with reference of your blog.
ReplyDeleteData Science Training in Chennai
Data science training in bangalore
Data science online training
Data science training in pune
Data Science training in kalyan nagar
Data Science training in OMR
selenium training in chennai
Very nice post here and thanks for it .I always like and such a super contents of these post.Excellent and very cool idea and great content of different kinds of the valuable information's.
ReplyDeletejava online training | java training in pune
java training in chennai | java training in bangalore
I got a lot of information from this blog. Thanks a lot. World's first memory dump analysis tool to find out amount of memory wasted by the application due to inefficient programming. Tool’s inbuilt AI intelligence recommends solution to fix the identified inefficiency.Heap Hero
ReplyDeleteIt is amazing and wonderful to visit your site.Thanks for sharing this information,this is useful to me...
ReplyDeletepython training in pune | python training institute in chennai | python training in Bangalore
Thank you for your post. This is excellent information.............
ReplyDeletejava training in chennai
selenium training in chennai
Useful Information, your blog is sharing unique information....
ReplyDeleteThanks for sharing!!!
java developers in hyderabad
java developers in ameerpet
java developers in gachibowli
java developers in kukatpally
Thank you for your post. This is excellent information. It is amazing and wonderful to visit your site.
ReplyDeleteDot Net Training in Chennai
Selenium Training in chennai
Best Software Testing Training Institute In Chennai | Manual Software Testing Coaching institute in Chennai | Testing Courses in Chennai
Java Training Institute in Chennai | Core Java Training in Chennai | Java Course and Certification
PHP Course in Chennai
This is an awesome post.Really very informative and creative contents. These concept is a good way to enhance the knowledge.I like it and help me to development very well.Thank you for this brief explanation and very nice information.Well, got a good knowledge.
ReplyDeleteMicrosoft Azure online training
Selenium online training
Java online training
Java Script online training
Share Point online training
The blog which you have shared is more useful for us.... Thanks for Sharing with us...
ReplyDeletePython Course in Coimbatore
Best Python Training in Bangalore
Data Science Course in Coimbatore
DevOps Training in Coimbatore
SEO Training in Coimbatore
Oracle Training in Coimbatore
Digital Marketing Training in Coimbatore
Android Training in Coimbatore
This comment has been removed by the author.
ReplyDeleteThis is very informative and interesting for those who are interested in blogging field
ReplyDeletePython Training in Chennai / Best Python Training in Chennai
Python Training Course in Chennai / Best Python Training Institute in Chennai
Appreciating the persistence you put into your blog and detailed information you provide.
ReplyDeleteOracle dba training chennai | oracle dba training course chennai
Good Post! Thank you so much for sharing the post, it was so good to read and useful to improve
ReplyDeleteJava Training in Electronic City
Thankyou for sharing this post.
ReplyDeleteJava course in Delhi
Java course in Noida
ReplyDeletepython course in coimbatore
java course in coimbatore
python training in coimbatore
java training in coimbatore
php course in coimbatore
php training in coimbatore
Nice article . you have explain step by step Java file examples
ReplyDeleteNice Blog. the blog is very Impressive. every blog should be explained very clear and easy to understand.
ReplyDeleteData Science Training Course In Chennai | Data Science Training Course In Anna Nagar | Data Science Training Course In OMR | Data Science Training Course In Porur | Data Science Training Course In Tambaram | Data Science Training Course In Velachery
Awesome Post. Have been waiting for a long time. Thanks for sharing this info with us.
ReplyDeleteAndroid Training Institute in Chennai | Android Training Institute in anna nagar | Android Training Institute in omr | Android Training Institute in porur | Android Training Institute in tambaram | Android Training Institute in velachery
This is one amazing piece of article. Helped a lot in increasing my knowledge.
ReplyDeleteDigital Marketing Training in Chennai | Certification | SEO Training Course | Digital Marketing Training in Bangalore | Certification | SEO Training Course | Digital Marketing Training in Hyderabad | Certification | SEO Training Course | Digital Marketing Training in Coimbatore | Certification | SEO Training Course | Digital Marketing Online Training | Certification | SEO Online Training Course
better to visit this site rather than any other it will be better oracle training in chennai
ReplyDelete"I am looking for and I love to post a comment thatExcelR Online data science training
ReplyDelete""The content of your post is awesome"" Great work!"
Very nice blog. Thanks for sharing your valuable content with us. Maybe you want to implement your blog then
ReplyDeleteVisit the below blog the most interesting ideas and opportunities are there.
Devops training in Bangalore
Devops Course in Bangalore
This helps so much to all the beginners. Thank you. Lots of support. Keep going.
ReplyDeleteIntelligent Systems in Your Everyday Life Post Office automatic address recognition
AI Training in Bangalore
AI Course in Bangalore
whenever I am feeling boring I am not playing some kinds of games but on the opposite, I am starting to find some blogs where I can find helpful articles but I am not commenting there but this article really is an awesome article I ever say thanks for sharing it with us.
ReplyDeleteif you have an interest in web designing or logo designing then visit us?
Logo Designers
I would like to thank you for the efforts you have made in writing this article. I am hoping the same best work from you in the future as well.
ReplyDeleteData Science Training in Hyderabad
This post is so interactive and informative.keep update more information...
ReplyDeleteDigital Marketing Course in Tambaram
Digital Marketing Course in Chennai