What do you want to save?
Add Code snippet
New code examples
-
TypeScript 2021-09-23 05:40:03
can interface have objects in java
No, you can never instantiate an interface in java. You can, however, refer to an object that implements an interface by the type of the interface. interface Animal{ void eat(); } You cannot do this “Animal animal = new Animal();” Bcoz in ... Add solution -
Java 2021-09-22 16:31:03
how to change single character of a string in java
//short answer: you cannot individually change any specific character //of a String in java. You can however do this: String s1 = "This is a String"; String s2 = s1.substring(0, 8) + "o" + s1.substring(9); System.out.println(s2); //Pr... Add solution -
Javascript 2021-09-22 13:00:02
how to create a mixed array in javascript
The array in JavaScript can be created by using var keyword followed by array name as shown below: var NumArr = [1,2,3,4,5]; You can create JavaScript array with mixed data types as well, for example, array containing both numbers and strings: var MixA... Add solution -
Java 2021-09-22 10:55:04
exception in java
In java exception is an object. Exceptions are created when an abnormal situations are arised in our program. Exceptions can be created by JVM or by our application code. All Exception classes are defined in java.lang. In otherwords we can say Exceptio... Add solution -
Java 2021-09-21 12:09:02
Get current date and time in java 8
// Get current date and time in java 8 import java.time.LocalDate; import java.time.LocalDateTime; import java.time.LocalTime; public class CurrentDateTimeJava8 { public static void main(String[] args) { LocalDate ld = LocalDate.now(); ... Add solution -
Other 2021-09-20 16:05:03
how to make your own game engine
Step 1: Learn Linear Algebra. Step 2: Learn java (or any language you want) Step 3: Develop a Math Engine. Step 4: Learn Computer Graphics. Step 5: Learn OpenGL and do a lot of projects. Step 6: Learn Design Patterns. Step 7: Develop a Rendering Eng... Add solution