what is difference between interface and abstract class?
549796
Chosing Interfaces vs Abstract Classes in not an eithier or choice, consider for example , if your applications functionality is likely to change in future then you could probably define the methods in an interface and let the functionality be defined by the class that implements the inteface,and thereby still maintain compatablity after revision, but on the other hande lets say, in case you want to write a class that forces a certain behaviour, ie , the behaviour remains constant, then you are better of defining it as an abstract class. Abstract classes are excellent ways to create planned inheritance hierachy, and remember a class that creates an abstract method can also call that method.\nAs a rule try to remember, if you are into creating API's then interfaces are the choice , on the other hand if you are building something like an application framework, consider using abstract classes to force certain behavioural characteristics,into all classes that extend your abstract class and let that class define the rest.
52791
C) ABC, somthing1, something2 must be interface for the expression to be legal.\n\nThough java doesn't supports multiple inheritence for class, an interface can extend as many interface as needed. You can try compiling. But there is also a reason behind it.\nJava does not supports multiple inheritence because in diamond inheritence ( B and C extends A and D extends both B and C) it can cause ambiguity( as two copies of members of A would present in D).\nThis is not so for interface as there can't be ambiguity as all refer to same copy. So Java supports multiple inheritence for Inetrface
933539
What do you mean by java class?
403084
Yes..\n\nSince you have many types of products you need some type of interface to ensure your classes are written correctly through each instance that its extending... Asscociation terms...\n\nSo you have a Factory and then you have a FactoryInterface\nNow you need Car implements FactoryInterface \nand ect..\n\nAnd within that Interface all those products should have stuff in common since your doing something similar..\n\nIt is quite complex for someone online to explain how to do a program like this:)\n\nI hope I helped.\n\nbtw Polymorphism uses interfaces..\nTake a lookj at the link I provided under.\n\nThere are some univeristy students with Masters and PHD who are willing to help people with computer problems.. It is a forum located http://www.campusinteractive.com/forum/
588044
what about it \n\nmake the database  then make the interface ..
701316
Inner Classes \n\nInner classes let you define one class within another. \n\nThey provide a type of scoping for your classes since you can make one class a member of another class.\n\nJust as classes have member variables and methods, a class can also have member classes.\n\nclass Outer { \n/class Inner { } \n}// End of class \n\nif you compile it,\n%javac Outer.java\n\n\nyou’ll end up with two class files:\nOuter.class\nOuter$Inner.class\n\n\ne.g.\n\nclass Outer { \nprivate int x = 5;\n\npublic void outerMethod() {\nInner in = new Inner();\nin.innerMethod();\n}\n\nclass Inner {\npublic void innerMethod() {\nSystem.out.println("Outer variable x is " + x);\n}\n} \n}// End of class \n\n\nYou can create four different types of inner classes, based upon the how and the where of creation. \nNested top-level classes\nIf you declare a class within a class and specify the static modifier, the compiler treats the class just like any other top-level class. Any class outside the declaring class accesses the nested class with the declaring class name acting similarly to a package. eg, outer.inner. Top-level inner classes implicitly have access only to static variables. There can also be inner interfaces. All of these are of the nested top-level variety.\n\nMember classes\nMember inner classes are just like other member methods and member variables and access to the member class is restricted, just like methods and variables. This means a public member class acts similarly to a nested top-level class. The primary difference between member classes and nested top-level classes is that member classes have access to the specific instance of the enclosing class.\n\nLocal classes\nLocal classes are like local variables, specific to a block of code.Their visibility is only within the block of their declaration. In order for the class to be useful beyond the declaration block, it would need to implement a more publicly available interface.Because local classes are not members, the modifiers public, protected, private, and static are not usable.\n\nAnonymous classes \nAnonymous inner classes extend local inner classes one level further. As anonymous classes have no name, you cannot provide a constructor.
856966
method is like a function if you familiar with c or c++.\nMethod is called like a function the same way you did in c or c++\nMethod in class is a method which associates with its data and other members like functions, objects, etc.\n\nWhile object method is a method which is invoked or called by the object as a referrence. It can also calls a method from another class, depending on your hierarchy, where the other class must either be on top(base class) or same level or at the bottom as long as it has the linkage. To do this, u must use a polymorphism technique (which mostly learn at the institute).\n\nPlease refer to the reference book for this --I'm out of my memory for this!! I've been graduated for a long time ago:)\nBut if you have a technical problem to be solved, you can ask me.\nThis is my email:-> k_mz79@yahoo.com
23070
In C++, the only difference is that classes by default have private members, while structs by default have public members.  All other things that classes can do (inheritance, virtual methods, etc.), structs can do as well.
987749
Object-based:\nhttp://en.wikipedia.org/wiki/Object-based_language\n\nObject-oriented:\nhttp://en.wikipedia.org/wiki/Object-oriented_programming_language\n\n\nYou'd be surprised how much you can find by just searching...
1066843
I'm assuming you're asking from a Java point of view, so I'll answer along those lines.\n\nAn interface defines a set of methods clustered around common theme. It provides no implementation at all. When a class "implements" an interface, it must provide an implemenation for each method defined in the interface.\n\nAn abstraction (or abstract class) also defines a set of methods clustered around a common theme. The main different is that the abstract class may have implemenation provided behind some or all of the methods, although it does not need to.\n\nIn Java, a class must extend exactly [abstract] class. If not specified, then Object is defaulted as that extended class.\n\nA class may implement as many interfaces as it wishes.
191514
Let's call this practice class-specific import. So say \njava.util.Date;\ninstead of\njava.util.*;\n\nThis is hardly optimization. It is for human reading only. It is not useful, especially if you use a good IDE. Eclipse, for example, can automatically expand imports. It can also collapse imports so they are not in your way. You are very unfortunate if you have to read the import statement to figure out what the code does.\n\nOnce the code is compiled, all classes are resolved and however the imports are organized makes no difference. at runtime, there are only fully qualified classes.
1030688
The object oriented programming will give the impression very unnatural to a programmer with a lot of procedural programming experience. In Object Oriented programming Encapsulation is the first pace. Encapsulation is the procedure of covering up of data and functions into a single unit (called class). An encapsulated object is often called an abstract data type. In this article let us see about it in a detailed manner. \n\nThe need of encapsulation is to protect or prevent the code (data) from accidental corruption due to the silly little errors that we are all prone to make. In Object oriented programming data is treated as a critical element in the program development and data is packed closely to the functions that operate on it and protects it from accidental modification from outside functions. \n\nEncapsulation provides a way to protect data from accidental corruption. Rather than defining the data in the form of public, we can declare those fields as private. The Private data are manipulated indirectly by two ways. The first method is using a pair of conventional accessor and mutator methods. Another one method is using a named property. Whatever be the method our aim is to use the data with out any damage or change.\n\nusing system;\npublic class Department\n{\nprivate string departname;\n.......\n\n// Accessor.\npublic string GetDepartname()\n{\nreturn departname;\n}\n\n// Mutator.\npublic void SetDepartname( string a)\n{\ndepartname=a;\n}\n\n}\nLike the above way we can protect the private data from the outside world. Here we use two separate methods to assign and get the required data.\n\npublic static int Main(string[] args)\n{\nDepartment d = new Department();\nd.SetDepartname("ELECTRONICS");\nConsole.WriteLine("The Department is :"+d.GetDepartname());\nreturn 0;\n}\nIn the above example we can't access the private data departname from an object instance. We manipulate the data only using those two methods.\n\nProperties are a new language feature introduced with C#. Only a few languages support \nthis property. Properties in C# helps in protect a field in a class by reading and writing to it. The first method itself is good but Encapsulation can be accomplished much smoother with properties.\n\nusing system;\npublic class Department \n{\nprivate string departname;\npublic string Departname\n{\nget\n{\nreturn departname;\n}\nset \n{\ndepartname=value;\n}\n}\n}\npublic class Departmentmain\n{\npublic static int Main(string[] args)\n{\nDepartment d= new Department();\nd.departname="Communication";\nConsole.WriteLine("The Department is :{0}",d.Departname);\nreturn 0;\n} \n}\n\nFrom the above example we see the usage of Encapsulation by using properties. The property has two accessor get and set. The get accessor returns the value of the some property field. The set accessor sets the value of the some property field with the contents of "value”. Properties can be made read-only. This is accomplished by having only a get accessor in the property implementation.
109898
Another tip - class names and file names are CASE SENSITIVE.  If you create a class "Apple", and refer to it as "apple", you won't find it at runtime.\n\n(I'm just beyond a novice at Java - hope this helps too - just vote for the other guy).
108544
Your object will be passed by reference because\nthat's how Java passes all objects.  Only the\nprimitive types like "int" are passed by value.
382095
java usees wrapper classes...Byte,Integer..they are in java.lang package..\n\nin each such class there is one memeber \nstatic int SIZE\n\nusing that u can find out..\n\neg.System.out.println(Byte.SIZE);\n//The number of bits used to represent a byte value in two's complement binary form\n\nSIMILARITY FOR OTHER DATA TYPES..\n\ncheck out documentation site..or if u have already downloaded doc..then use that..
969657
Is the library class a final class? If it is not, suggest you create a new class that extend that library class and include this new class as an inner class in your class. \nCheck out 'Inner Class' for Java, that allows a class definition to be placed inside  another class.
551920
RMI uses object serialization to marshal and unmarshal parameters and does not truncate types, supporting true object-oriented polymorphism. \n\nJSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate.\n\nRMI is used to pack the methods data whe you call it, or when you receive its info...