Java Programming OOP Questions and Answers Set 5

Java Programming OOPs

Questions 41 to 50



41.
What would the output be of the above Program - III before and after it is called?
(a)   and b before call : 15  20                a and b after call : 30  10
(b)   a and b before call : 5   2                a and b after call : 15  20
(c)   a and b before call : 15  20 a and b after call : 15  20
(d)   a and b before call : 30  10 a and b after call : 15  20
(e)   a and b before call : 15  20 a and b after call :
42.
What would the argument passing method be which is used by the above Program - III?
(a)  Call by value                                    (b)  Call by reference
(c)  Call by java.lang class                      (d)  Call by byte code                           
(e)  Call by compiler.
43.
Consider the following program:
class prob1{
int puzzel(int n){

       int result;

       if (n==1)
          return 1;
       result = puzzel(n-1) * n;
         return result;
 }
}

class prob2{

public static void main(String args[])

  {

      prob1 f = new prob1();

      System.out.println(" puzzel of 6 is = " + f.puzzel(6));

   }
}
Which of the following will be the output of the above program?
(a)  6                       (b)  120                   (c)  30                     (d)  720                   (e)  12.
44.
The blank space in the following sentence has to be correctly filled :
Members of a class specified as ……………….. are accessible only to methods of that class.
(a)  Protected          (b)  Final                 (c)  Public               (d)  Private              (e)  Static.
45.
Java compiler javac translates Java source code into ………………………
(a)  Assembler language                         (b)  Byte code
(c)  Bit code                                          (d)  Machine code   
(e)  Platform dependent code.
46.
……………….. are used to document a program and improve its readability.
(a)  System cells      (b)  Keywords          (c)  Comments         (d)  Control structures         (e)  Blocks.
47.
In Java, a character constant’s value is its integer value in the ………………………character set.
(a)  EBCDIC            (b)  Unicode            (c)  ASCII                (d)  Binary               (e)  BCD.
48.
In Java, a try block should immediately be followed by one or more ……………….. blocks.
(a)  Throw       (b)  Run   (c)  Exit (d)  Catch          (e)  Error.
49.
An abstract data type typically comprises a …………… and a set of ……………... respectively.
(a)  Data representation, classes             (b)  Database, operations
(c)  Data representation, objects             (d)  Control structure, operations
(e)  Data representation, operations.
50.
In object-oriented programming, the process by which one object acquires the properties of another object is called
(a)  Encapsulation                                  (b)  Polymorphism   (c)  Overloading
(d)  Inheritance                                       (e)  Overriding.






Answers



41.
Answer : (c)
Reason : There wont be any change because of the scope.
42.
Answer : (a)
Reason : Call by value is the right choice.
43.
Answer : (d)
Reason : 720 is the output after the execution of the program
44.
Answer : (d)
Reason : Private access specifier property says that members of class of private are accessible only to the methods of that class.
45.
Answer : (b)
Reason : Byte Code is the file which is generated after java source file is compiled.
46.
Answer : (c)
Reason : Comments improve the readability of the program
47.
Answer : (b)
Reason : Java uses Unicode format.
48.
Answer : (d)
Reason : Try must be followed by catch block in exceptions in java.
49.
Answer : (e)
Reason : An abstract data type contains data representation and operations
50.
Answer : (d)
Reason : Inheritance is the mechanism in which one object acquires the properties of another object.



<< 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 >>


115 comments :

  1. I almost gave correct answer with my knowledge in java, thanks for sharing.
    Regards,

    JAVA Training in Chennai|JAVA Course in Chennai

    ReplyDelete
  2. In my point of view, this is really very well and informative content given about Bangalore Real Estate market, where you can easily get affordable housing option for living purposes.
    2bhk Flats in Paschim Vihar

    ReplyDelete
  3. The Spring Framework is a lightweight framework for developing Java enterprise applications. It provides high performing, easily testable and reusable code. Spring handles the infrastructure as the underlying framework so that you can focus on your application.Spring is modular in design, thereby making creation, handling and linking of individual components so much easier. Spring implements Model View Container(MVC) design pattern.
    spring mvc validation example

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

    ReplyDelete
  5. we will go through the Spring Security setup & common features, when and where to apply, different authentication methods, securing password with encoding schemes, & integrating Spring Security in Spring MVC 4 and Hibernate based applications, exploring them with help of fully-working examples.
    spring security training in chennai

    ReplyDelete
  6. The Spring Framework is a lightweight framework for developing Java enterprise applications. It provides high performing, easily testable and reusable code. Spring handles the infrastructure as the underlying framework so that you can focus on your application.Spring is modular in design, thereby making creation, handling and linking of individual components so much easier. Spring implements Model View Container(MVC) design pattern.
    Spring mvc hello world example

    ReplyDelete
  7. Java is very good blog,it's highly professional course.Thanks for sharing
    java online Training Hyderabad

    ReplyDelete
  8. I believe there are many more pleasurable opportunities ahead for
    individuals that looked at your site.


    java training in chennai


    java training in bangalore

    ReplyDelete
  9. Nice blog and absolutely outstanding. You can do something much better but i still say this perfect.Keep trying for the best.
    Ghana passport online

    ReplyDelete
  10. Thank you a lot for providing individuals with a very spectacular possibility to read critical reviews from this site. Data Science Training in Chennai

    ReplyDelete
  11. I believe there are many more pleasurable opportunities ahead for individuals that looked at your site. java training in chennai

    ReplyDelete
  12. I believe there are many more pleasurable opportunities ahead for individuals that looked at your site.

    Hadoop Training in chennai

    ReplyDelete
  13. I believe there are many more pleasurable opportunities ahead for individuals that looked at your site.
    Best RPA Training in Bangalore

    Best RPA Training in Chennai

    ReplyDelete
  14. Needed to compose you a very little word to thank you yet again regarding the nice suggestions you’ve contributed here.

    Best Devops Training institute in Chennai

    ReplyDelete
  15. Howdy, would you mind letting me know which web host you’re utilizing? I’ve loaded your blog in 3 completely different web browsers, and I must say this blog loads a lot quicker then most. Can you suggest a good internet hosting provider at a reasonable price?


    Digital Marketing Training in Chennai

    ReplyDelete
  16. It has been simply incredibly generous with you to provide openly what exactly many individuals would’ve marketed for an eBook to end up making some cash for their end, primarily given that you could have tried it in the event you wanted.

    Hadoop Training in Chennai

    ReplyDelete
  17. It’s always so sweet and also full of a lot of fun for me personally and my office colleagues to search your blog a minimum of thrice in a week to see the new guidance you have got.AWS Training in chennai

    ReplyDelete
  18. Nice Info!

    It is really a great and useful piece of info. I’m glad that you shared this helpful info with us. Thank you for sharing Final Year Arduino Projects Chennai | 2018 Final Year Android Projects Chennai.

    ReplyDelete
  19. Thanks for your useful post.I would like that sharing best Dotnet Projects Chennai | Arduino Projects in Chennai.

    ReplyDelete
  20. Brilliant article. The information I have been searching precisely. It helped me a lot, thanks. Keep coming with more such informative article. Would love to follow them. sap abap online training videos

    ReplyDelete
  21. Thank you a lot for providing individuals with a very spectacular possibility to read critical reviews from this site.
    AWS Training in Chennai

    ReplyDelete
  22. Those guidelines additionally worked to become a good way to recognize that other people online have the identical fervor like mine to grasp great deal more around this conditionPython training in Bangalore

    ReplyDelete
  23. Thank you a lot for providing individuals with a very spectacular possibility to read critical reviews from this site.
    Data Science Training in Chennai

    ReplyDelete

  24. This is really an awesome one thanks to the author for a wonderful sharing.
    AWS Training Course in chennai

    Selenium Training in Chennai

    ReplyDelete
  25. Thanks for such a great article here. I was searching for something like this for quite a long time and at last I’ve found it on your blog. It was definitely interesting for me to read  about their market situation nowadays.
    MEAN stack training in Chennai
    MEAN stack training in bangalore
    MEAN stack training in tambaram
    MEAN stack training in annanagar

    ReplyDelete
  26. That was a great message in my carrier, and It's wonderful commands like mind relaxes with understand words of knowledge by information's.
    python training in chennai | python training in bangalore

    python online training | python training in pune

    python training in chennai

    ReplyDelete
  27. Thank you so much for a well written, easy to understand article on this. It can get really confusing when trying to explain it – but you did a great job. Thank you!

    java training in chennai | java training in bangalore

    java online training | java training in pune

    java training in chennai | java training in bangalore

    ReplyDelete
  28. Wonderful article, very useful and well explanation. Your post is extremely incredible. I will refer this to my candidates...
    Devops training in Chennai
    Devops training in Bangalore
    Devops Online training
    Devops training in Pune

    ReplyDelete
  29. Nice tips. Very innovative... Your post shows all your effort and great experience towards your work Your Information is Great if mastered very well.

    java training in chennai | java training in bangalore

    java online training | java training in pune

    selenium training in chennai

    selenium training in bangalore

    ReplyDelete
  30. Hello! This is my first visit to your blog! We are a team of volunteers and starting a new initiative in a community in the same niche. Your blog provided us useful information to work on. You have done an outstanding job.
    Best AWS Training in Chennai | Amazon Web Services Training in Chennai

    AWS Training in Bangalore | Amazon Web Services Training in Bangalore

    ReplyDelete
  31. Your good knowledge and kindness in playing with all the pieces were very useful. I don’t know what I would have done if I had not encountered such a step like this.
    Devops Training in pune

    Devops Training in Chennai

    Devops Training in Bangalore

    AWS Training in chennai

    AWS Training in bangalore

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

    ReplyDelete
  33. I wanted to thank you for this great read!! I definitely enjoying every little bit of it I have you bookmarked to check out new stuff you post.is article.
    python training in Bangalore
    python training in pune
    python online training
    python training in chennai

    ReplyDelete
  34. Webtrackker Technology is IT Company and also providing the Solidwork
    training in Noida at running project by the real time working trainers.
    If you are looking for the Best Solidwork training institute in Noida
    then you can contact to webtrackker technology.
    Webtrackker Technology
    C- 67, Sector- 63 (Noida)
    Phone: 0120-4330760, 8802820025
    8802820025
    Solidwork training institute in Noida

    ReplyDelete
  35. Read all the information that i've given in above article. It'll give u the whole idea about it.
    python training in chennai
    python training in Bangalore

    ReplyDelete
  36. UiPath Training in Bangalore by myTectra is one the best UiPath Training. myTectra is the market leader in providing Robotic Process Automation on UiPath
    ui path training in bangalore

    ReplyDelete
  37. Thank you a lot for providing individuals with a very spectacular possibility to read critical reviews from this site.
    python training in velachery
    python training institute in chennai

    ReplyDelete
  38. Wonderful article. Thanks for writing this type of article. Kindly Visit Us @ Rigid box

    ReplyDelete
  39. Hmm, it seems like your site ate my first comment (it was extremely long) so I guess I’ll just sum it up what I had written and say, I’m thoroughly enjoying your blog. I as well as an aspiring blog writer, but I’m still new to the whole thing. Do you have any recommendations for newbie blog writers? I’d appreciate it.

    Best Selenium Training in Chennai | Selenium Training Institute in Chennai | Besant Technologies

    Selenium Training in Bangalore | Best Selenium Training in Bangalore

    AWS Training in Bangalore | Amazon Web Services Training in Bangalore

    ReplyDelete
  40. Thanks a lot for sharing us about this update. Hope you will not get tired on making posts as informative as this. 
    Java training in Tambaram | Java training in Velachery

    Java training in Omr | Oracle training in Chennai

    ReplyDelete
  41. Great job.... Awesome list, just starting a blog and this is going to be a massive help. Thank you!

    iOS Training
    J2EE Training in Chennai
    Core Java Training

    ReplyDelete
  42. Information from this blog is very useful for me, am very happy to read this blog Kindly visit us @ Coimbatore Christmas Gift boxes | Wallet Box

    ReplyDelete
  43. wooowwww i like this post.
    District marketing provide digital marketing, SEO services, etc. If you want to increase your website ranking then you can call us every time 24*7 @ +97126229998

    digital marketing in abu dhabi
    best digital marketing agency in abu dhabi

    ReplyDelete
  44. Needed to compose you a very little word to thank you yet again regarding the nice suggestions you’ve contributed here.
    iosh course in chennai

    ReplyDelete
  45. Needed to compose you a very little word to thank you yet again regarding the nice suggestions you’ve contributed here.
    python training in chennai
    java training in chennai

    ReplyDelete
  46. We are a team of volunteers and starting a new initiative in a community in the same niche. Your blog provided us useful information to work on. You have done an outstanding job.
    safety course in chennai

    ReplyDelete
  47. Sap fico training institute in Noida

    Sap fico training institute in Noida - Webtrackker Technology is IT Company which is providing the web designing, development, mobile application, and sap installation, digital marketing service in Noida, India and out of India. Webtrackker is also providing the sap fico training in Noida with working trainers.


    WEBTRACKKER TECHNOLOGY (P) LTD.
    C - 67, sector- 63, Noida, India.
    F -1 Sector 3 (Near Sector 16 metro station) Noida, India.

    +91 - 8802820025
    0120-433-0760
    0120-4204716
    EMAIL: info@webtrackker.com
    Website: www.webtrackker.com

    ReplyDelete
  48. Awesome! Education is the extreme motivation that open the new doors of data and material. So we always need to study around the things and the new part of educations with that we are not mindful.
    Data Science course in kalyan nagar
    Data Science course in OMR
    Data Science course in chennai
    Data science course in velachery
    Data science course in jaya nagar
    Data Science interview questions and answers

    ReplyDelete
  49. And indeed, I’m just always astounded concerning the remarkable things served by you. Some four facts on this page are undeniably the most effective I’ve had.
    SOFTWARE TRAINING IN CHENNAI
    POWERBI TRAINING IN CHENNAI
    CCNA TRAINING IN CHENNAI

    ReplyDelete
  50. I really like your blog. You make it interesting to read and entertaining at the same time. I cant wait to read more from you.
    devops online training

    aws online training

    data science with python online training

    data science online training

    rpa online training

    ReplyDelete
  51. I have picked cheery a lot of useful clothes outdated of this amazing blog. I’d love to return greater than and over again. Thanks! 
    aws online training

    data science with python online training

    data science online training

    rpa online training

    ReplyDelete
  52. excellent post as always i like it thank you for sharing

    คาสิโนออนไลน์ที่น่าเชื่อถือและมีความเป็นมืออาชีพที่สุดในตอนนี้
    โปรโมชั่นGclub ของทางทีมงานตอนนี้แจกฟรีโบนัส 50%
    เพียงแค่คุณสมัคร สล็อตออนไลน์ กับทางทีมงานของเราเพียงเท่านั้น
    ร่วมมาเป็นส่วนหนึ่งกับเว็บไซต์คาสิโนออนไลน์ของเราได้เลยค่ะ
    สมัครสล็อตออนไลน์ >>> Goldenslot
    สนใจร่วมสนุกกับ คาสิโนออนไลน์ คลิ๊กได้เลย
    มีทั้งคาสิโนออนไลน์ หวยออนไลน์ ฟุตบอลออนไลน์ สล็อตออนไลน์ และอื่นๆอีกมากมาย

    ReplyDelete

  53. Great Article. This Blog Contain Good information about ERP Software. Thanks For sharing this blog. Can you please do more articles like this blog.


    best catering services in chennai
    top catering services in chennai
    corporate catering services in chennai
    taste catering services in chennai
    veg Catering services in chennai

    ReplyDelete
  54. Thank you for sharing very informative and creative content.This content is very useful best way to extent the knowledge of 3dsmax classes in indore Revit classes in indore sketchup classes in indore Autocadclasses 3d animation classes in indore photoshop classes in indore vfx classes indoreDesign centre best coaching classes

    ReplyDelete
  55. This information you provided in the blog that is really unique I love it!
    Python Training in Delhi
    Python Training institute in Delhi

    ReplyDelete
  56. 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. nice blog
    Ai & Artificial Intelligence Course in Chennai
    PHP Training in Chennai
    Ethical Hacking Course in Chennai Blue Prism Training in Chennai
    UiPath Training in Chennai

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

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

    ReplyDelete
  59. Good Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as updated one, keep blogging. oracle training in chennai

    ReplyDelete
  60. We're offering additional discount on early enrollment on full module Automation Training. Get Job Support with Unlimited Placement Opportunities.
    Call us at +91-9953489987, 9711287737
    For more details Visit www.diac.co.in

    ReplyDelete
  61. Nice & Informative Blog !
    In case you are searching for the best technical services for QuickBooks, call us at QuickBooks Error 8007 and get impeccable technical services for QuickBooks. We make use of the best knowledge for solving your QuickBooks issues.

    ReplyDelete
  62. interesting AND useful stuff
    devOps training in chennai |DevOps Course in Chennai

    https://www.credosystemz.com/training-in-chennai/devops-training-chennai/

    ReplyDelete
  63. Great post! I am actually getting ready to across this information, It’s very helpful for this blog.Also great with all of the valuable information you have Keep up the good work you are doing well.
    java online training
    Visit us: Java Online Training

    ReplyDelete
  64. Hey! Well-written blog. It is the best thing that I have read on the internet today. Moreover, if you are looking for the solution of QuickBooks Software, visit at QuickBooks Phone Number to get your issues resolved quickly.

    ReplyDelete
  65. Best PLC training Institute help aspirants to learn Industrial automation, PLC, SCADA, HMI by DIAC and we help to find your dream job in core industry. Free Demo Class Call now 9953489987.

    ReplyDelete
  66. Thank you so much for sharing such a informative and useful blog post. I hope that you and your family will good. I really appreciate you instafasto

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

    Apply Now for Big DATA Training Classes in Noida

    For more details about the course fee, duration, classes, certification, and placement call our expert at 70-70-90-50-90

    ReplyDelete
  68. Wonderful blog & good post.Its really helpful for me, awaiting for more new post. Keep Blogging FDM is one of the Best Social media optimization (SMO) company services in Chennai... For more enquiry contact us: 91+ 9791811111 or visit our website.


    ReplyDelete
  69. This post is extremely radiant. I extremely like this post. It is outstanding amongst other posts that I’ve read in quite a while. Much obliged for this better than average post. I truly value it! best institute for sap training in hyderabad

    ReplyDelete
  70. Thank you so much for sharing this information. Do visit be projects in chennai

    ReplyDelete
  71. Thank you for sharing your creativity and passion with the world.Dive into Python: A Comprehensive Training Journey

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

    ReplyDelete