This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function loadMainUI() { | |
console.log("Loading main UI"); | |
views.navigate("menu"); | |
} | |
function unloadMainUI() {} | |
kpay.initialize(unloadMainUI, loadMainUI); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SET SERVEROUTPUT ON | |
DECLARE | |
inFindString VARCHAR2(100); | |
inReplaceString VARCHAR2(100); | |
countRecords NUMBER; | |
CURSOR c1 IS select variable_im_interested from table_to_update where col_to_update like '//old_string_to_find/%'; | |
BEGIN | |
Dbms_Output.Put_Line('Starting: ' || Systimestamp); | |
inFindString := '//old_string_to_find/'; | |
inReplaceString := '//new_string/'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Calculator { | |
interface IntegerMath { | |
int operation(int a, int b); | |
} | |
public int operateBinary(int a, int b, IntegerMath op) { | |
return op.operation(a, b); | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class TestClass { | |
public Object getObject() { | |
Object object1 = new String(“New_String”); | |
Object objectArray[] = new Object[1]; | |
objectArray[0] = object1; //After this line, object1 and objectArray[0] are pointing to the same String object. | |
object1 = null; //After this line, object1 points to null but objectArray[0] is still pointing to the String object. | |
objectArray[0] = null; //After this line objectArray[0] also starts pointing to null so there is no reference left that is pointing to the String object. | |
//So it is now available for Garbage collection. | |
return object1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class B { | |
public static void main(String… args) { | |
System.out.println(“Value of var1 = “+B1.var1); | |
System.out.println(“Object 1”); | |
B1 object1 = new B1(); | |
object1.printData(); | |
System.out.println(“Object 2”); | |
B1 object2 = new B1(); | |
object2.printData(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class A { | |
static { System.out.println(“A Loaded”); } | |
public static void main(String[] args) { | |
System.out.println(“A should have been loaded”); | |
A1 a1 = null; | |
System.out.println(“A1 should not have been loaded”); | |
System.out.println(a1.i); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class E implements Interf1 { | |
public String getId() { | |
return “E: get Id”; | |
} | |
public String getOtherId() { | |
return “E: get Other Id”; | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class D implements Interface1, Interface2 { | |
public String getId() { | |
return “1111”; | |
} | |
} | |
interface Interface1 { | |
public default String getId() { | |
return “0000”; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class D implements Interface2 { | |
public static void main (String… args) { | |
Interface1 acct = new D(); | |
System.out.println(acct.getId()); | |
} | |
public String getId() { | |
return “1111”; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class C implements I1, I2 { | |
public void m1() {} | |
public static void main(String… args) { | |
C tc = new C(); | |
System.out.println(( ( I1) tc).VALUE); | |
} | |
} | |
interface I1 { | |
int VALUE = 1; |
NewerOlder