1. What's the difference between an interface and abstract class?
2. Explain different way of using thread? What should you consider when you are using the thread? 3. Difference between Map.HashMap and HashTable? Difference between Vector and ArrayList?
4. What is Static in Java? When is the Static method run?
5. What is the Struts Framework? How is the MVC design pattern used in Struts Framework?
6. What are the core classes in Struts? What useage in Struts Framework respectively?
2. Explain different way of using thread? What should you consider when you are using the thread? 3. Difference between Map.HashMap and HashTable? Difference between Vector and ArrayList?
4. What is Static in Java? When is the Static method run?
5. What is the Struts Framework? How is the MVC design pattern used in Struts Framework?
6. What are the core classes in Struts? What useage in Struts Framework respectively?
Abstract class permits part of the implementation of the methods and can only be extended.
2. implements runnable or extends Thread.
3. map is a interface, and Hash Map or HashTable is implement. HashMap isn't Thread Safe, and HashTable is. So HashMap has a better speed than HashTable. Vector and Arraylist is the same as HashTable and HashMap.
4.static is a keyword of Java,it can describle a method, variable. and it's store in the stack of memory.
6.Action,ActionMapping,ActionForm,ActionServlet are the core classes in struts.
at frist , actionServlet is center controller in structs framework , it charge recive the information from the client , and it can trans those information to other help classes . the help class includes action class, invalidate class, exception controller or international severice.
and the action is the class which do the logic processing. ActionForm is used for store the page form information. it called by other help classes. ActionMapping is used to navigation. when action class has done all logic method, it want to forward the result to view. the actionmapping can get the name that define in actionmapping xml file, to mapping the name that action want to forward, and show that page to client.good good study, day day up.
A. Interface is absolute abstract class..All motheds in interface are abstract and we don not need public static modifer to modify abstract methods.All constant in interface are public static final.
B. Abstract class may have non abstract method.But if there is a method which is abstract,We need add abstract modifer to modify this class;2. Explain different way of using thread? What should you consider when you are using the thread?
The thread could be implemented by using runnable interface or by inheriting from the Thread class. The former is more advantageous, 'cause when you are going for multiple inheritance..the only interface can help.3. Difference between Map.HashMap and HashTable? Difference between Vector and ArrayList?
Map is Interface and Hashmap is class that implements that.
Vector is synchronized whereas arraylist is not.4. What is Static in Java? When is the Static method run?
Static means one per class, not one for each object no matter how many instance of a class might exist. This means that you can use them without creating an instance of a class.Static methods are implicitly final, because overriding is done based on the type of the object, and static methods are attached to a class, not an object. A static method in a superclass can be shadowed by another static method in a subclass, as long as the original method was not declared final. However, you can't override a static method with a nonstatic method. In other words, you can't change a static method into an instance method in a subclass.
i only hava this four answers,because i haven't know well in struts.
Thank you for answering my questions!