Answer Posted / ravikiran(aptech mumbai)
public+abstract for methods
public+abstract for interface declaration
public+static+final for the interface declaration variable
Is This Answer Correct ? | 32 Yes | 5 No |
Post New Answer View All Answers
Write a program to print 15 random numbers using foreach of java 8?
Can a class be declared as static?
How do you write a conditional statement?
What is a pattern what is an anti pattern?
What is Recursion Function?
Say you want to store the information about a number of pets in an array. Typical information that you could store for each pet (where relevant) would be • Breed of animal • Animal's name • Its birth date • Its sex • Whether it has been sterilised or not • When it is due for its next inoculation • When it last had its wings clipped For each type of pet (eg. dog, cat or bird) you would typically define a class to hold the relevant data. Note: You do not need to implement these classes. Just answer the following questions. 3.1.1 What would be the advantage of creating a superclass (eg. Pet) and declaring an array of Pet objects over simply using an array of Objects, storing each of the instances of the different pet classes (eg. Dog, Cat or Bird) in it? 3.1.2 Would you define Pet as a class or as an interface? Why? (2) (2)
What is multithreading in java?
State one difference between a template class and class template.
Explain when we should make an instance variable private.
Write a regular expression to validate a password. A password must start with an alphabet and followed by alphanumeric characters; its length must be in between 8 to 20.
Is array size fixed in java?
What is widening and narrowing in java? Discuss with an example.
How can we make string upper case or lower case?
Explain treeset?
What happens if I remove static from main method?