What do you want to save?
Add Code snippet
New code examples
-
Other 2022-02-02 10:36:02
Duplicate entry Exception
import java.lang.Exception try: #Your insert statement here except Exception, e: # Catches any python errors except java.lang.Exception, e: #SQL Integrity errors come as Java errors so you need java.lang.Exception if "Duplicate entry&quo... Add solution -
-
Java 2022-02-01 10:45:46
string replace java
public static void main(String args[]){ String s1="my name is khan my name is java"; String replaceString=s1.replace("is","was");//replaces all occurrences of "is" to "was" System.out.println(replace... Add solution -
Java 2022-02-01 08:51:29
polymorphism in java
POLYMORPHISM: It is an ability of object to behave in multiple form. The most common use of polymorphism is Java, when a parent class reference type of variable is used to refer to a child class object. In my framework E.g.: WebDriver driver = new Chrom... Add solution -
Java 2022-01-31 13:40:42
find length of array java
/** * An Example to get the Array Length is Java */ public class ArrayLengthJava { public static void main(String[] args) { String[] myArray = { "I", "Love", "Music" }; int arrayLength = myArray.length; //array length attribu... Add solution -
Other 2022-01-30 18:51:52
oops concepts
OOP focuses on the objects that are required to be manipulated instead of logic. - It makes development and maintenance easier - It provides data hiding - It provides ability to simulate real-world - less memory and organized - reusable OOP language fol... Add solution -
Javascript 2022-01-26 00:30:16
js hoisting
/*Hoisting is JavaScript's default behavior of moving all declarations to the top of the current scope (script or function). Be carefull that only declaration gets hoisted NOT the initialitations*/ var x = 5; alert("x is = "+x+". y is = ... Add solution -
Java 2022-01-23 23:25:36
java replace character
public static void main(String args[]){ String s1="my name is khan my name is java"; String replaceString=s1.replace("is","was");//replaces all occurrences of "is" to "was" System.out.println(replace... Add solution