What do you want to save?
Add Code snippet
New code examples
-
Java 2022-03-24 09:40:33
instance variable java
A variable declared inside the class is called instance variable. Value of instance variable are instance specific. public class InstanceVariableDemo { // instance variable declared inside the class and outside the method int c; public void subt... Add solution -
BASIC 2022-03-20 07:40:02
get unique random number in vb.net
Dim numbers = Enumerable.Range(0, 11).ToList() Dim RandomClass As New Random() Dim RandomIndex As Integer For counter As Integer = 1 To 5 RandomIndex = RandomClass.Next(0, numbers.Count) MsgBox(numbers(RandomIndex)) numbers.RemoveAt(RandomInde... Add solution -
Other 2022-03-20 01:25:05
inheritance vs composition
Inheritance should only be used when: Both classes are in the same logical domain The subclass is a proper subtype of the superclass The superclass’s implementation is necessary or appropriate for the subclass The enhancements made by the s... Add solution -
Java 2022-03-18 03:30:02
remove item from arraylist in java
// Java.util.ArrayList.remove(Object) method example import java.util.ArrayList; import java.util.List; public class ArrayListRemoveObjectMethod { public static void main(String[] args) { List<Integer> al = new ArrayList<>(); ... Add solution -
Java 2022-03-18 01:20:02
how to make abstract method in java
Sometimes we may come across a situation where we cannot provide implementation to all the methods in a class. We want to leave the implementation to a class that extends it. In such case we declare a class as abstract.To make a class abstract we use ke... Add solution -
Other 2022-03-12 16:45:25
what is static variable
The static variable is used to refer to the common property of all objects (that is not unique for each object), e.g., The company name of employees, college name of students, etc. Static variable gets memory only once in the class area at the time of ... Add solution
Best helpers
Erica Price
+5
Scoiattolo
+5
Vigrond
+5
Muazam
+5
Emmet
+5
NeuronQ
+5
A G Davey
+5
Arad
+5
Meital Regev
+5
Entrepreneur
+5
Majte
+5
JoshuaFicy
+5