Java Programming OOP Questions and Answers Set 6

Java Programming OOPs

Questions 51 to 60



51.
Re-implementing an inherited method in a sub class to perform a different task from the parent class is called
(a)  Binding             (b)  Transferring       (c)  Hiding               (d)  Coupling           (e)  extending.
52.
In a class definition, the special method provided to be called to create an instance of that class is known as a/an
(a)  Interpreter          (b)  Destructor         (c)  Constructor       (d)  Object              (e)  Compiler.
53.
Consider the following statements about Java packages:
I.     Packages don’t provide a mechanism to partition all class names into more manageable chunks.
II.     Packages provide a visibility control mechanism.
III.    One of the important properties of a package is that all classes defined inside a package is accessible by code outside that package.
IV.   The .class files for classes declared to be part of a package can be stored in multiple directories.
Which of them is correct?
(a)  Only (I) above                                  (b)  Only (II) above
(c)  Only (III) above                                 (d)  Only (IV) above
(e)  All (I), (II), (III) and (IV) above are wrong.
54.
Consider the following statements:
I.     A class can be declared as both abstract and final.
II.     A class declared as final can be extended by defining a sub-class.
III.    Resolving calls to methods dynamically at run-time is called late binding.
IV.   The class Object defined by Java need not be a super class of all other classes.
Identify the correct statement from the following:
(a)  Both (I) and (II) above                       (b)  Both (III) and (IV) above
(c)  Both (I) and (III) above                      (d)  Both (II) and (IV) above
(e)  Only (III) above.
55.
Identify, from among the following, the incorrect descriptions related to Java :
(a)   Java Virtual Machine translates byte code into its own system’s machine language and runs the resulting machine code
(b)   The arithmetic operations *, /, %, + and – have the same level of precedence
(c)   Comments do not cause any action to be performed during the program execution
(d)   All variables must be given a type when they are declared
(e)   Java variable names are case-sensitive.
56.
Consider the following statement(s) about Java:
I.     All white-space characters (blanks) are ignored by the compiler.
II.     Java keywords can be used as variable names.
III.    An identifier does not begin with a digit and does not contain any spaces.
IV.   The execution of Java applications begins at method main.
Which of them is correct?
(a)  Both (I) and (III) above                      (b)  Both (II) and  (IV) above
(c)  Both (I) and (II) above                       (d)  (III) and (IV) above
(e)  All (I), (II), (III) and (IV) above.
57.
Consider the following data types in Java :
I.  Int                       II.  Boolean              III.  Double              IV.  String                V.  Array.
Which of them are simple data types?
(a)  Both (I) and (II) above                       (b)  (I), (II), (III) and (IV) above
(c)  (I), (II) and (III) above                         (d)  (II) and (III) above
(e)  All (I), (II), (III), (IV) and (V) above.
58.
For what values respectively of the variables gender and age would the Java expression gender == 1 && age >= 65 become true?
(a)  gender = 1, age = 60                        (b)  gender = 1, age = 50
(c)  gender = 1, age = 65                        (d)  gender = 0, age = 70
(e)  gender = 0, age = 55.
59.
Consider the following Java program :
       public class Compute {

              public static void main (string args [ ])
              {
                     int result, x ;
                     x = 1 ;
                     result = 0;
                     while (x < = 10) {
                            if (x%2 = = 0) result + = x ;
                     + + x ;
              }
              System.out.println(result) ;
              }
       }
Which of the following will be the output of the above program?
(a)  55                     (b)  30                     (c)  25                     (d)  35                     (e)  45.
60.
Which of the following statements about Java Threads is correct?
(a)   Java threads don’t allow parts of a program to be executed in parallel
(b)   Java is a single-threaded language
(c)   Java’s garbage collector runs as a high priority thread
(d)   Ready, running and sleeping are three states that a thread can be in during its life  cycle
(e)   Every java application is not multithreaded.


Answers 


51.
Answer : (e)
Reason : Extending is the mechanism in which reimplementing an inherited method in a sub class to perform a different task from the parent class.
52.
Answer : (c)
Reason : According to the concept of Constructor C is right choice.
53.
Answer : (b)
Reason : Except b above all are contradictory to the functionality of package.
54.
Answer : (e)
Reason : Except e above all are contradictory to the functionality of classes concept of java
55.
Answer : (b)
Reason : The rule of precedence for arithmetic operations is *,/,+or- from left to right.
56.
Answer : (d)
Reason : Remaining all are contradictory to the statements with respect to java.
57.
Answer : (c)
Reason : String and array don’t fall into the category of simple datatypes.
58.
Answer : (c)
Reason : && is the short circuit operator which sees that all conditions should be true then only it will evaluate to true.
59.
Answer : (b)
Reason : B is the right choice remaining all are contradictory to the execution of program
60.
Answer : (d)
Reason : Ready, running and sleeping  which are three states that a thread can be in during its life  cycle.



<< Prev   1   2   3   4   5   6   7   8   9   10   11   12   13   14   15   16   17   18   19   20   21   22  

 23   24   25   26   27   28   29   30  Next >>



83 comments :

  1. This comment has been removed by the author.

    ReplyDelete
    Replies
    1. IntelliMindz is the best IT Training Institute in Bangalore with placement, offering 200 and more software courses with 100% Placement Assistance.
      SAP HR Course in Bangalore

      Delete
    2. IntelliMindz is the best IT Training Institute in Bangalore with placement, offering 200 and more software courses with 100% Placement Assistance.
      SAP HRCourse in Bangalore

      Delete
  2. 51 - Re-implementing an inherited method in a sub class to perform a different task from the parent class is called " Overriding " not " extending "

    ReplyDelete
    Replies
    1. They got me confused.I was searching for "overriding" in the options

      Delete
  3. Thanks for sharing this good blog.It's amazing blogJava Online Course

    ReplyDelete
  4. 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.

    java training in chennai


    java training in bangalore

    ReplyDelete
  5. Thank you a lot for providing individuals with a very spectacular possibility to develop a knowledge.
    Java training in chennai

    ReplyDelete
  6. Great collection of questions. Thank you. Please share more questions and answers.

    Java Training in Chennai
    Java Training institute in Chennai

    ReplyDelete
  7. 3D Animation and Multimedia Training in Noida
    Best institute for 3d Animation and Multimedia
    Best institute for 3d Animation and Multimedia Course training Classes in Noida- webtrackker Is providing the 3d Animation and Multimedia training in noida with 100% placement supports. for more call - 8802820025.
    Company Address:
    Webtrackker Technology
    C- 67, Sector- 63, Noida
    Phone: 01204330760, 8802820025
    Email: info@webtrackker.com
    Website: http://webtrackker.com/Best-institute-3dAnimation-Multimedia-Course-training-Classes-in-Noida.php



    ReplyDelete

  8. Best Solidworks training institute in noida

    SolidWorks is a solid modeling computer-aided design (CAD) and computer-aided engineering (CAE) computer program that runs on Microsoft Windows. SolidWorks is published by Dassault Systems. Solid Works: well, it is purely a product to design machines. But, of course, there are other applications, like aerospace, automobile, consumer products, etc. Much user friendly than the former one, in terms of modeling, editing designs, creating mechanisms, etc.
    Solid Works is a Middle level, Main stream software with focus on Product development & this software is aimed at Small scale & Middle level Companies whose interest is to have a reasonably priced CAD system which can support their product development needs and at the same time helps them get their product market faster.

    Company Address:

    WEBTRACKKER TECHNOLOGY (P) LTD.
    C-67,Sector-63,Noida,India.

    E-mail: info@webtracker.com

    Phone No: 0120-4330760 ,+91-880-282-0025


    http://webtrackker.com/solidworks-training-Course-institute-in-noida-delhi.php

    Best Solidworks training institute in noida

    ReplyDelete
  9. This comment has been removed by the author.

    ReplyDelete
  10. webtrackker technology is companey and also providing the solid work training in noida
    at running project by the real time working trainers if you are looking for all best
    http://webtrackker.com/solid warks-training-course-institute-in-noida-delhi:pnp


    ads
    Webtrackker Technology
    C- 67, Sector- 63 (Noida)
    Phone: 0120-4330760, 8802820025

    8802820025
    http://webtrackker.com/solidworks-training-Course-institute-in-noida-delhi.php

    ReplyDelete
  11. Latest News in Hindi

    Latest News in Hindi- Hindustan channel is the best online web portal in india where you read the all latest indian news in hindi. if you are looking the Latest News in Hindi, live news channel, hindi news channel, live news channels in hindi, live hindi channels then hindustan channel is best for you.
    Latest News in Hindi

    Company address:
    C- 67, Sector- 63, Noida
    Phone: 01204330760, 8802820025


    URL: https://hindustanchannel.com

    ReplyDelete
  12. Bellsouth Mail Support Contact Number 1-888-259-9444 | JSK Support

    http://jsksupport.com/bellsouth-support.php

    Our Tech support experts Offer throughout the whole day 24*7. We are available all the time for your help, you can contact anytime for Bellsouth Mail Support. Bellsouth Mail Support Toll Free Number for you all issue resolution. Call us @ 1-888-259-9444.
    Bellsouth Mail Support Contact Number 1-888-259-9444 | JSK Support

    ReplyDelete
    Replies
    1. come and learn java from best java from best java training institute in noida an make a successful career wih java training institute from noida.
      java training institute in noida.

      Delete
  13. This is a nice article here with some useful tips for those who are not used-to comment that frequently. Thanks for this helpful information I agree with all points you have given to us. I will follow all of them.

    Java training in Bangalore |Java training in Rajaji nagar | Java training in Bangalore | Java training in Kalyan nagar

    Java training in Bangalore | Java training in Kalyan nagar | Java training in Bangalore | Java training in Jaya nagar

    ReplyDelete
  14. 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…
    excel advanced excel training in bangalore | Devops Training in Chennai

    ReplyDelete
  15. Thank you for allowing me to read it, welcome to the next in a recent article. And thanks for sharing the nice article, keep posting or updating news article.
    python course institute in bangalore
    python Course institute in bangalore
    python course institute in bangalore

    ReplyDelete
  16. Your very own commitment to getting the message throughout came to be rather powerful and have consistently enabled employees just like me to arrive at their desired goals.
    angularjs-Training in chennai

    angularjs Training in chennai

    angularjs-Training in tambaram

    angularjs-Training in sholinganallur

    angularjs-Training in velachery

    ReplyDelete
  17. Python is an open-source and high-level programming language developed for use with a broad range of operating systems. It is termed as most powerful programming language due to its dynamic and diversified nature.

    Python Training in Noida
    WEBTRACKKER TECHNOLOGY (P) LTD.
    C - 67, sector- 63, Noida, India.
    phone no-+91 - 8802820025,0120-433-0760
    EMAIL-info@webtrackker.com

    ReplyDelete
  18. Hi,

    The article is really good. Must help all the new Java Programmer. Expecting more Java Related Blogs.

    Best Regards
    - Vigneshwaran ( Java Application Development Company )

    ReplyDelete
  19. Whoa! I’m enjoying the template/theme of this website. It’s simple, yet effective. A lot of times it’s very hard to get that “perfect balance” between superb usability and visual appeal. I must say you’ve done a very good job with this.

    Devops Training in bangalore
    Digital Marketing Training in bangalore
    Data Science Training in bangalore
    Java Training in bangalore

    ReplyDelete
  20. Thank you for sharing valuable information.
    You can also check this links. Hope it can help you and your friend, who is serching a job.
    For Freshers and experienced, and salary to be depends upon face to face interview.
    Required Presentation Specialist Only For Male in Gurgaon
    Thank you.

    ReplyDelete
  21. There's no doubt i would fully rate it after i read what
    big data course malaysia

    ReplyDelete
  22. Good mail!Thank you so much for sharing this beautiful article,it's been so nice to read and helpful to upgrade my understanding,keep blogging...
    data science courses near marathahalli|
    data science courses near kalyan nagar|
    hadoop courses in bangalore|
    hadoop courses in kalyan nagar

    ReplyDelete
  23. Beautiful tutorial.Thank you for sharing the precious HadoopTraining information.It's very helpful.Continue to share updated tutorials ...
    data science classes in bangalore|
    data science training in marathahalli|
    hadoop classes near marathahalli|
    hadoop courses in kalyan nagar

    ReplyDelete
  24. Thank you for sharing valuable information.
    You can also check this links. Hope it can help you and your friend, who is looking for job change.
    If you have up to 10 years experience, then you can come for interview round. For more details you can direct call on this number @ +91 9250406614.
    It is totally free service. Free Free Free !!
    Jd for Group Manager (Oil and Gas research) - Gurgaon
    Thank you.

    ReplyDelete
  25. Very informative blog thanks for sharing it. Are you looking for the best data science training institute in Gurgaon

    ReplyDelete
  26. I am really enjoying reading your well written articles. It looks like you spend a lot of effort and time on your blog. I have bookmarked it and I am looking forward to reading new articles. Keep up the good work.
    data science course malaysia

    ReplyDelete
  27. Very creative and very informative content. This idea is a nice way to improve the sharing of knowledgethanks...
    Hadoop training in Bangalore
    Hadoop training in KalyanNagar|
    RPA training in Bellandur
    RPA training in KalyanNagar

    ReplyDelete
  28. Best Digital Marketing training institute in noida
    Best Digital Marketing training institute in noida-Digital marketing or online marketing as it is popularly known is a tool to carry on marketing for our product online.Direct email marketing, search engine optimization and search engine marketing are few of the tools which come under this category. They are becoming more and more common in the online world. It is a very popular form of advertising
    Webtrackker Technology Pvt Ltd
    add.:- B-85 SEC. - 64 NOIDA
    E-47 sec. - 3 noida
    PHONE NO.:- +91- 8802820025, 01204330760
    Gmail id :- webtrackkerinfo@gmail .com , info@webtrackker.com
    Website:- www.webtrackker.com
    Best Digital Marketing training institute in noida

    ReplyDelete
  29. I Got Job in my dream company with decent 12 Lacks Per Annum salary, I have learned this world most demanding course out there in the current IT Market from the Hadoop training in btm experts who helped me a lot to achieve my dreams comes true. Really worth trying

    ReplyDelete
  30. I went through your blog its really interesting and holds an informative content. Thanks for uploading such a wonderful blog.
    salesforce Training in Bangalore
    uipath Training in Bangalore
    blueprism Training in Bangalore

    ReplyDelete
  31. Amazing article. It helps me to improve myself in many ways thanks for sharing this kind of wonderful informative blogs in live. Keep it up!!
    aws Training in Bangalore
    python Training in Bangalore
    hadoop Training in Bangalore
    angular js Training in Bangalore
    bigdata analytics Training in Bangalore

    ReplyDelete
  32. Very interesting, good job and thanks for sharing such a good blog. your article is so convincing that I never stop myself to say something about it. You’re doing a great job. Keep it up

    aws Training in Bangalore
    python Training in Bangalore
    hadoop Training in Bangalore
    angular js Training in Bangalore
    bigdata analytics Training in Bangalore

    ReplyDelete
  33. Wonderful thanks for sharing an amazing idea. keep it...

    Get Best SAP HR HCM Training in Bangalore from Real Time Industry Experts with 100% Placement Assistance in MNC Companies. Book your Free Demo with Softgen Infotech.

    ReplyDelete
  34. I like your post very much. It is very useful for my research. I hope you can share more info about this. Keep posting
    Workday Integration training
    Tableau online training
    Tableau Server training
    Tableau Advanced training
    ETL Testing Training

    ReplyDelete
  35. You are doing a great job. You inspire me to write for other. Thank you very much.If any one want to learn java core to advance contact us on 9311002620 or visit our further websites :-https://htsindia.com/Courses/java/core-java-training-course-institute

    ReplyDelete
  36. Mumbai journey guide is places to visit in mumbai for you. Are you anxious about your travels to Mumbai? Are you afraid that you'll pass over out on something? Mumbai is one massive anxious places to visit in navi mumbai location and best places to visit in mumbai the last issue you need to be doing is wasting your time looking for locations to visit in Mumbai and activities. https://www.trahot.in/places-to-visit-in-mumbai/
    places to visit in mumbai


    ReplyDelete
  37. we've got amassed all of the first-rate places to visit in Goa for youngsters places to visit in goa on this blog. examine to plot your checklist! Given a chance, how lots of us would love to spend nights in Goa dancing to throbbing beats best places to visit in goa with a calming beer in palms, everybody, proper? places to visit in north goa https://www.trahot.in/places-to-visit-in-goa/ places to visit in goa

    ReplyDelete
  38. This comment has been removed by the author.

    ReplyDelete
  39. thanks for giving this information. We updated all the trending new information related to any topics.
    To be more updated about all the news around you, you can check this website
    royal enfield classic 350

    ReplyDelete
  40. hello friend my name is priti kumari i work as the digital marketing in Delhi.i am search engine optimization with many SEO software developer. if you are talking about the best educational institution in Delhi,help me get the best educational institute in Delhi.we are you offering some best services in our institute with 100%job offers are available.
    best java training institute in Delhi

    ReplyDelete
  41. Thank you for sharing this amazing post. Looking forward to reading more.
    Visit us: Java Training
    Visit us: Java Course

    ReplyDelete
  42. A very nice guide. I will definitely follow these tips. Thank you for sharing such detailed article. Visit my website to get best Information About Best Bank PO coaching Institutes in Borivali.

    Best Bank PO coaching Institutes in Borivali
    Top Bank PO coaching Institutes in Borivali

    ReplyDelete
  43. Hi, I am John Smith I am Web Developer, It is an amazing blog thanks for the sharing the blog. Frantic infotech provide the ui /ux design android software such as an information about software development for costumer service. Franti infotech also provide the codeigniter web developer. The development of advanced web applications is Orient Software’s specialty and we will successfully fulfill all your web application development requirements, from small-sized to wider-ranged projects.

    ReplyDelete
  44. Hi, I have just started to Learn Java Online. and this blog is really informative for me. Thank you for this blog!

    ReplyDelete
  45. Great Post. Very informative. Keep Sharing!!

    Apply Now JAVA Training in Noida
    For more details about the course fee, duration, classes, certification, and placement call our expert at 70-70-90-50-90

    ReplyDelete
  46. thanks for sharing this website it is very useful informating . such it wonderful articlebusy 21 download

    ReplyDelete
  47. I think this is a real great blog. Really looking forward to read more. Great.

    photoshoot in havelock Andaman


    ReplyDelete
  48. This comment has been removed by the author.

    ReplyDelete
  49. Thanks for providing this greatest information. your information was very nice. thanks for sharing.
    Best UI/UX Design Companies in Chennai
    web design company in chennai
    website Re-design in chennai


    ReplyDelete

  50. Thanks for sharing this post with us.Wikivela

    ReplyDelete
  51. I feel very grateful that I read this. It is very helpful and very informative and I really learned a lot from it.
    devops training in bangalore
    devops course in bangalore
    aws training in bangalore

    ReplyDelete
  52. Very useful information thank you for sharing this interesting and profitable knowledge here is also useful information java training course in Jabalpur

    ReplyDelete
  53. Are you looking to master Python programming and enhance your career prospects? Join the Python Course in Gurgaon at APTRON Gurgaon, a top-tier training institute renowned for delivering quality education and hands-on experience. Whether you're a beginner or an experienced programmer, this course is tailored to meet the needs of every aspiring developer.

    ReplyDelete