Java Programming OOP Questions and Answers Set 4

Java Programming OOPs

Questions 31 to 40



31.
Mark the incorrect statement from the following:
(a)   Java is a fully object oriented language with strong support for proper software engineering techniques
(b)   In java it is not easy to write C-like so called procedural programs
(c)   In java language objects have to be manipulated
(d)   In java language error processing is built into the language
(e)   Java is not a language for internet programming.
32.
In java, objects are passed as
(a)  Copy of that object                          (b)  Method called call by value
(c)  Memory address                                                            (d)  Constructor    
(e)  Default constructor.
33.
Which of the following is not a component of Java Integrated Development Environment (IDE)?
(a)  Net Beans                                        (b)  Borland’s Jbuilder
(c)  Symantec’s Visual Café                    (d)  Microsoft Visual Fox Pro
(e)  Microsoft Visual J++.
34.
Identify, from among the following, the incorrect variable name(s).
(a)  _theButton                                       (b)  $reallyBigNumber
(c)  2ndName                                         (d)  CurrentWeatherStateofplanet
(e)  my2ndFont.

Use the following declaration and initialization to evaluate the Java expressions given in questions 5 - 8;
int a = 2, b = 3, c = 4, d = 5;
float k = 4.3f;
35.
System.out.println( - -b * a + c *d - -);
(a)  21                     (b)  24                     (c)  28                     (d)  26                     (e)  22.
36.
System.out.println(a++);
(a)  3                       (b)  2                       (c)  4                       (d)  10           (e)  Synatax error.
37.
System.out.println (–2U * ( g – k ) +c);
(a)  6                       (b)  3                       (c)  2                       (d)  1              (e)  Syntax error.
38.
System.out.println (c=c++);
(a)  2                       (b)  4                       (c)  5                       (d)  8              (e)  Syntax error.
39.
Consider the following Java program :
class IfStatement{
public static void main(String args[])
       {
       int a=2, b=3;
              if (a==3)
              if (b==3)
              System.out.println("===============");
              else
              System.out.println("#################");
              System.out.println("&&&&&&&&&&&");
       }
}
Which of the following will the output be?
(a)   ===============
(b)   #################
&&&&&&&&&
(c)   &&&&&&&&&&&
(d)   ===============
#################
&&&&&&&&&&
(e)   ################.
40.
An applet cannot be viewed using
(a)   Netscape navigator
(b)   Microsoft Internet Explorer
(c)   Sun’ Hot Java Browser
(d)   Applet viewer tool which comes, with the Java Development Kit.
(e)   Jbuilder.

Use the following Java program for answering question 11 and 12
class test{
 void meth(int i, int j)
     {
       i *= 2;
       i /= 2;
     }
}

class argumentPassing
{
       public static void main(String args[])
              {
              test ob = new test();
              int a = 15, b = 20;

              System.out.println("a and b before call :"+ a +" " + b);
              ob.meth(a,b);
              System.out.println("a and b after call : "+ a + " " +b);
                      }

                               (Program – III)
 





Answers


31.
Answer : (d)
Reason : Java is basically designed for compiler construction but later on it is also being used for internet programming.
32.
Answer : (c)
Reason : Objects are passed as  memory address  but not by the constructor etc.,
33.
Answer : (c)
Reason : Micro soft visual foxpro is not the part of IDE
34.
Answer : (c)
Reason : A variable name should not start with numeric digit,
35.
Answer : (b)
Reason : Based on the hierarchy of operations 24 is correct answer.
36.
Answer : (b)
Reason : Based on the postincrementation operator 2 is the correct answer.
37.
Answer : (e)
Reason : Syntatically the expression is wrong.
38.
Answer : (b)
Reason : first c is assigned by 2 and then incremented
39.
Answer : (c)
Reason : C is the right choice because of the IF statement hierarchy.
40.
Answer : (d)
Reason : Applet cant be viewed using JBuilder.


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



47 comments :

  1. Thanks for your informative post on Java application development. This open source platform assists software developers to create stunning mobile application with ease. Further, they can make use of this platform at free of cost.
    .Net Training in Chennai
    PHP Training in Chennai
    Big Data Training in Chennai

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

    ReplyDelete
  3. Error in Question no 33, option is c or d ??

    ReplyDelete
  4. Pretty article! I found some useful information in your blog, it was awesome to read, thanks for sharing this great content to my vision, keep sharing.
    Regards,

    Python Training in Chennai|Python Classes in Chennai

    ReplyDelete
  5. Hi Admin,
    Quite Interesting post!!! Thanks for posting such a useful post about OOPS. I wish to read your upcoming blog to enhance my skill set in java, keep blogging.
    Regards,
    SAP training in chennai|SAP course in chennai|SAP training

    ReplyDelete
  6. Helo Admin,
    I really enjoyed while reading your article, the information you have mentioned in this post was damn good. Keep sharing your blog with updated and useful information.
    Regards,
    sap training in Chennai|sap course in Chennai|SAP Training in Chennai|SAP FICO Training in Chennai

    ReplyDelete
  7. No. 40 you say the answer is (d) , and you also say that Applet cant be viewed using JBuilder.
    i know that SDK or JDK has the applet viewer tool ..so the answer should be (e)
    Thanks alot

    ReplyDelete
  8. https://informaticaramamohanreddy.blogspot.in/2012/08/configuration-of-informatica.html?showComment=1495002675649#c5413244749511450099

    ReplyDelete
  9. I really appreciate information shared above. It’s of great help. If someone want to learn Online (Virtual) instructor lead live training in LIFERAY, kindly contact us http://www.maxmunus.com/contact
    MaxMunus Offer World Class Virtual Instructor led training on LIFERAY. We have industry expert trainer. We provide Training Material and Software Support. MaxMunus has successfully conducted 100000+ trainings in India, USA, UK, Australlia, Switzerland, Qatar, Saudi Arabia, Bangladesh, Bahrain and UAE etc.
    For Demo Contact us.
    Saurabh Srivastava
    MaxMunus
    E-mail: saurabh@maxmunus.com
    Skype id: saurabhmaxmunus
    Ph:+91 8553576305 / 080 - 41103383
    http://www.maxmunus.com/


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

    ReplyDelete
  11. Excellent post!!! In this competitive market, customer relationship management plays a significant role in determining a business success. That too, cloud based CRM product offer more flexibility to business owners to main strong relationship with the consumers. Cloud Computing Training in Chennai|cloud computing training centers in chennai

    ReplyDelete

  12. Java is very good blog,it's highly professional course.Thanks for sharing
    java online course Bangalore

    ReplyDelete
  13. good way to enhance the knowledge.thanks for sharing. please keep it up selenium Online Training Hyderabad

    ReplyDelete
  14. Hiii....Thank you so much for sharing Great info...Nice post....Keep move on...
    Best Salesforce Training Institutes in Hyderabad

    ReplyDelete

  15. Nice blog information thanks for sharing .I am really impressed with your writing abilities

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

    ReplyDelete
  16. It a very good for students thanks

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

    ReplyDelete
  18. Nice post I have been searching for a useful post like this on salesforce course details, it is highly helpful for me and I have a great experience with this. Salesforce Training India   

    ReplyDelete
  19. Amazing blog,
    I appreciate your smart work, Thank you so much.
    Web hosting Services

    ReplyDelete
  20. Title:
    Best Software Training Institute near me | Infycle Technologies

    Description:
    If you search for the best software training institute near me, the first results showed is Infycle Technologies. Yes! Infycle Technologies is the top software training institute in Chennai that has branches in Keelkattalai, Medavakkam, OMR, and Thoraipakkam, contributing the best software courses like Oracle, AWS, Java, Python, Data Science, etc., in a way of hands-on practical training & excellent placement opportunities. Dial 7502633633 to get more info.

    Best training institute in Chennai

    ReplyDelete
  21. Infycle Technologies, the No.1 software training institute in Chennai offers the Selenium course in Chennai for tech professionals, freshers, and students at the best offers. In addition to the Selenium, other in-demand courses such as Python, Big Data, Oracle, Java, Python, Power BI, Digital Marketing, Cyber Security also will be trained with hands-on practical classes. After the completion of training, the trainees will be sent for placement interviews in the top companies. Call 7504633633 to get more info and a free demo.

    ReplyDelete
  22. Title:
    Description:
    Want to set your career towards Big Data? Then Infycle is with you to make this into your life. Infycle Technologies gives the combined and best Big Data Hadoop training in Chennai, along with the 100% hands-on training guided by professional teachers in the field. In addition to this, the mock interviews for the placement will be guided to the candidates, so that, they can face the interviews with full confidence. Once after the mock interview, the candidates will be placed in the top MNC's with a great salary package. To get it all, call 7502633633 and make this happen for your happy life.
    best training institute in chennai

    ReplyDelete
  23. Hi, Thank you for this informative blog, I have just started to learn java course and this blog is really informative for me. Thank you for this blog!

    ReplyDelete
  24. Jubilant to read your blog. One of the best I have gone through. If anyone want to get experience certificate in Pune. Here the Dreamsoft is providing the genuine experience certificate in Pune. Dreamsoft is the 20 years old consultancy providing experience certificate in Pune. You can contact at the 9599119376 or can go to our website at https://experiencecertificates.com/experience-certificate-provider-in-pune.html

    ReplyDelete
  25. Want to do a No.1 Data Science Training in Chennai with a Certification Exam? Catch the best features of Data Science training courses with Infycle Technologies, the best Data Science Training & Placement institutes in and around Chennai. Infycle offers the best hands-on training to the students with the revised curriculum to enhance their knowledge. In addition to the Certification & Training, Infycle offers placement classes for personality tests, interview preparation, and mock interviews for clearing the interviews with the best records. To have all it in your hands, dial 7504633633 for a free demo from the experts.

    ReplyDelete
  26. Excellent read, Positive site, I have read a few of the articles on your website now, and I really like your style.


    ecommerce services provider in india

    ecommerce solutions services

    ReplyDelete
  27. Obviously a satisfying estimation. i've affirmation this bewildering announce. much obliged to you for sharing proposal generally it. I in truth further to that. much appreciated accurately part to your meet. https://crackdj.com/wifi-password-hacker/

    ReplyDelete
  28. I waterfrontt any expression to understand this call.....truely i'm dazzled from this make recognized....the person that make this screen it changed into an excellent human..thanks for shared this long past us. Norton Internet Security Full Crack

    ReplyDelete
  29. In Java, it is not possible to create an array of int values. The reason for this is that there are only 8 bits available in a byte. If you need to store a bigger number than 8 bits, you will have to convert your int value into an array of bytes and then back into an int again.The following example convert int to array in java of bytes
    java int to int array
    int number = 110101;
    String temp = Integer.toString(number);
    int[] numbers = new int[temp.length()];
    for (int i = 0; i < temp.length(); i++) {
    numbers[i] = temp.charAt(i) - '0';
    }
    convert int to array in java
    public class ArraySum {
    public static void main(String[] args) {
    int first = Integer.parseInt(args[0]);
    int[] firstArray = transform(first);
    int second = Integer.parseInt(args[1]);
    int[] secondArray = transform(second);
    int[] result = sum(firstArray, secondArray);
    print(result);
    }

    public static int[] transform(int num){
    // TODO change only the following part.

    }

    public static int[] sum(int[] a, int[] b){
    // TODO change only the following part.

    }

    public static void print(int[] array){
    System.out.print("[");
    for (int i = 0; i < array.length; i++){
    if(i != array.length - 1) {
    System.out.print(array[i] + ", ");
    }else{
    System.out.print(array[i] + "]");
    }
    }
    }

    }

    ReplyDelete
  30. Glorious web site! I love the way it is straightforward upon my eyes it's far. I'm contemplating the way in which I might be prompted whenever another conspicuous screen has been made. glancing through out extra new updates. Have a colossal extensive stretches of significant stretches of light hours!! Happy Birthday Wishes To Son In Law

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

    ReplyDelete