Java Design Pattern

1.What is a design pattern.2.How many catogeries are there in Java patterns.3. How many patterns did you use in your project.4.Give me an example of Creational Patterns.5.What is Singleton pattern. Where did you use it.6.How do you use Factory pattern.7.Can explaing examples of Structural Patterns.8.What is difference between adapter pattern and decorator pattern.9.What is Facade [...]

Java Drill – 2

1.Can a private method of a superclass be declared within a subclass?2.Why Java does not support multiple inheritence ? 3.What is the difference between final, finally and finalize?4.Where and how can you use a private constructor.5.In System.out.println(),what is System,out and println,pls explain? 6.What is meant by “Abstract Interface”? 7.Can you make an instance of an [...]

Java Drill – 1

1.What is the difference between an Interface and an Abstract class? 2.What is the purpose of garbage collection in Java, and when is it used? 3.Describe synchronization in respect to multithreading. 4.Explain different way of using thread? 5.What are pass by reference and passby value? 6.What is HashMap and Map? 7.Difference between HashMap and HashTable? [...]

Java Coding Drill – One

1. Factorial finding public class Fact {        public static int factorial(int n) {            if (n==0)                   return 1;           else                  return n * factorial(n-1);         }        public static void main(String argv[]) {             int x;             x=9;             System.out.println(“Factorial of “+x+” is “+factorial(x));        }} 2. Divisible by number public class Divisor{          public static void main(String[] args){                int a [...]

Follow

Get every new post delivered to your Inbox.