remove public static Boolean returnFlag what this method will return true or

Remove public static boolean returnflag what this

This preview shows page 3 - 5 out of 14 pages.

remove public static Boolean returnFlag(). what this method will return true or false Which data set to use when need to search a data faster with key? Hash Map What is the time complexity of Java Set? O( 1 ) What is the size of float variable? 4 byte Explain different types of iteration in Java? They are 3 different types of loop in java.The 3 loop are for loop,while loop, and do-while loop. While loop is a control flow statement that allows code to be execute repeatedly based on given Boolean condition.For loop provides a concise way of writing the loop structure.Unlike a while loop, a for statement consumes the initialization,condition and increment /decrements in one line thereby providing a shorter,easy to debug structures of looping.Do while loop is similar to the while loop the only difference is that it checks for condition after exceuting the statments and therefore is an example of exit control loop. Chose appropriate data type for value 5.5 * Float
Image of page 3

Subscribe to view the full document.

How to add data in Stack? push What is the difference between abstract class and interface? * Main difference is methods of a Java interface are implicitly abstract and cannot have implentations.A Java abstract class can have instance methods that implements a default behavior.Variables declared in Java interface is by default final.An abstract class may contain non-final variables.Members of a Java interface are public by default.A Java abstract class can have the usual flavors of class members like private,protected,etc. Java interface should be implemented using keyword "implements" . A Java abstract class should be extended using keyword "extends". What is polymorphism, give an example? The word polymorphism means having many forms. In simple words, we can define polymorphism as the ability of a message to be displayed in more than one form. Real life example of polymorphism,a person at a same time can have different characteristic.Like a man at a same time is a father,a husband, a employee.So a same person posses have different behavior in different situations. This is called polymorphism. Polymorphism is considered as one of the important features of object oriented programming. Compile time polymorphism: This type of polymorphism is achieved by function overload or operator overload. Function overloading: When there are multiple function with same name but different parameters then these functions are said to be overloaded. Functions can overloading by change in numbers of arguments and/or change in type of arguments. Runtime polymorphism:This type of polymorphism is achieved by function overriding.Function overriding on the other hand occurs when a derived class has a definition for one of the members functions of the base class.That base function is said to be overridden.
Image of page 4
Image of page 5

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Ask Expert Tutors You can ask 0 bonus questions You can ask 0 questions (0 expire soon) You can ask 0 questions (will expire )
Answers in as fast as 15 minutes