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
Reflection | |
Serialization/ deserialisation | |
Clonable | |
Multi threaded | |
Class loading | |
Garbage collection | |
String pool/ Intern - caching string literal in string pool and point to same reference | |
double check locking in singleton | |
immutable - state of the object never changes [String never gets modified] | |
OCP(class open to changes and close to modifications) |
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 PrintVar { | |
public static void main( String[] args ) { | |
int x = 1; | |
System.out.println("value of x is " + x); | |
} | |
} |
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
#include <stdio.h> | |
int main() { | |
int x = 1; | |
printf("value of x is %d\n", x); | |
return 0; | |
} |