Skip to content

Instantly share code, notes, and snippets.

View techindepth's full-sized avatar
👋

ANISH ANTONY techindepth

👋
View GitHub Profile
public String makinStrings() {
String s = "Fred";
s = s + "47";
s = s.substring(2, 5);
s = s.toUpperCase();
return s.toString();
}
public class Person {
private String name;
public Person(String name) {
this.name = name;
}
public boolean equals(Object o) {
if (!(o instanceof Person))
return false;
public class Test {
public static void test(String str) {
int check = 4;
if (check == str.length()) {
System.out.print(str.charAt(check -= 1) +", ");
} else {
System.out.print(str.charAt(0) + ", ");
}
}
public class Test {
public static void test(String str) {
int check = 4;
if (check = str.length()) {
System.out.print(str.charAt(check -= 1) +", ");
} else {
System.out.print(str.charAt(0) + ", ");
}
}
public class Test {
public static void main(String[] args) {
// insert code here
System.out.println(s);
}
}
public class Test {
Integer i;
int x;
public Test(int y) {
i = x + y;
System.out.println(i);
}
public static void main(String[] args) {
public class Test {
Integer i;
int x;
public Test(int y) {
x = i + y;
System.out.println(x);
}
public static void main(String[] args) {
public void testIfA() {
if (testIfB("True")) {
System.out.println("True");
} else {
System.out.println("Not true");
}
}
public Boolean testIfB(String str) {
return Boolean.valueOf(str);
public String toString() {
StringBuffer buffer = new StringBuffer();
buffer.append('<');
buffer.append(this.name);
buffer.append('>');
return buffer.toString();
}
public class Person {
private String name, comment;
private int age;
public Person(String n, int a, String c) {
name = n;
age = a;
comment = c;
}