Delegates and events both play an important role in the event-driven program. The delegates can refer to a method, and it is quite similar to the function pointer in C++. Events notify that some action has been performed. The basic difference between delegates and events is that delegates hold the reference of the methods and event provides a way to access that method using delegates. Content: Delegates Vs Events in C# Comparison Chart Definition Key Differences … [Read more...]
Difference Between Boxing and Unboxing in C#
In C#, all the value types are derived from the class object. So, a reference variable of type object can refer to any other value type. C# introduces two methods to Boxing and Unboxing, which links value type to reference type. The basic difference between Boxing and Unboxing is that Boxing is the conversion of the value type to an object type whereas, on other hands, the term Unboxing refers to the conversion of the object type to the value type. Let us study the other differences between … [Read more...]
Difference Between ref and out in C#
"Ref" and "Out" are the parameter modifiers used in C#. Using ref and out, you can pass any value type by its reference to any method. The reason of passing any value type by its reference introduces the main difference between the ref and out keyword. The ref keyword allows the called method to alter the content of the argument passed to it with ref keyword. The out keyword allows called method to return more than one value at a single call. Let's study the difference between ref and out … [Read more...]
Difference Between Static and Final in Java
Static and final both are the keywords used in Java. The static member can be accessed before the class object is created. Final has a different effect when applied to class, methods and variables. The main difference between a static and final keyword is that static is keyword is used to define the class member that can be used independently of any object of that class. Final keyword is used to declare, a constant variable, a method which can not be overridden and a class that can not be … [Read more...]
Difference Between Interface and Abstract Class in Java & C#
Interface and Abstract class both contribute to "incomplete type" in OOP. Sometimes we need a superclass to define "what to do" but, not "how to do", it's how to do part will be implemented by the derived class according to its need, "interface" provide a solution to this. Sometimes we need a superclass class that defines some generalised structure that can be implemented by derived classes and some specified structure that can be utilised by the derived classes, "abstract class" provides a … [Read more...]
Difference Between throw and throws in Java
The throw and throws are the keywords used in exception handling. The throw keyword is used to handover the instance of the exception created by the programmer to the JVM manually. The throws keyword used to handover the responsibility of handling the exception occurred in the method to the caller method. The basic difference between the throw and throws is that the throw keyword uses the exception object whereas the throws keyword uses the name of the exception classes. Content: throw Vs … [Read more...]
Difference Between String and StringBuffer Class in Java
String and StringBuffer both are the classes which operate on strings. StringBuffer class is the peer class of the class String. The object of String class is of fixed length. The object of the StringBuffer class is growable. The basic difference between String and StringBuffer is that the object of the "String" class is immutable. The object of the class "StringBuffer" mutable. Content: String Vs StringBuffer Comparison Chart Definition Key Differences Conclusion Comparison … [Read more...]
Difference Between Final, Finally and Finalize in Java
The words 'final, finally, and finalize' lies within the context of Java. Each one of them is provided a different functioning. The basic difference between final, finally, and finalize is that final is an access modifier, finally is a block and finalize is a method of an object class. There are some other differences between final, finally, and finalize which are discussed in the comparison chart. Content: Final Vs Finally Vs Finalize Comparison Chart Definition Key Differences … [Read more...]
Difference Between Checked and Unchecked Exception in Java
"Throwable" is the parent class of the classes Error and Exception. The class "RuntimeException" and its subclasses, the class "Error" and its child classes are the "Unchecked exceptions" whereas, the remaining subclasses of the class "Exception" except "RuntimeException" are the checked exceptions. The basic difference between checked and unchecked exception is that the checked exceptions are checked by the compiler whereas, the compiler does not check the unchecked exceptions. Let us … [Read more...]
Difference Between Error and Exception in Java
"Throwable" act as the root for Java's error and exception hierarchy. "Error" is a critical condition that cannot be handled by the code of the program. "Exception" is the exceptional situation that can be handled by the code of the program. The significant difference between error and exception is that an error is caused due to lack of system resources, and an exception is caused because of your code. Let us study other differences between error and exception along with a comparison … [Read more...]
- « Previous Page
- 1
- …
- 6
- 7
- 8
- 9
- 10
- 11
- Next Page »