What’s up fellow coders and welcome to Geekific!
I’m Ed, a full-time software developer and coding enthusiast. Join me on this never-ending learning journey as we dive into the fascinating world of coding. Whether you're a beginner or an experienced programmer, this channel is dedicated to providing you with valuable insights, tips, and tutorials to help you excel in your coding endeavors. Let's forge a tight-knit community of passionate learners and embark on an exciting coding adventure together!

YouTube Membership Milestones:
• After 1K members, we’ll disable all Ads on our videos.
• After 2K members, we’ll start uploading full deep-dive courses.
• After 4K members, we’ll bind all content in an exclusive e-book for all our members.


Geekific

What is the purpose of the transient keyword in Java?

4 days ago | [YT] | 2

Geekific

What will be the output of the following code?
--------------------
public static void main(String[] args) {
System.out.println(myMethod(6));
}

public static int myMethod(int n) {
if (n <= 1) return n;
return myMethod(n - 2) + myMethod(n - 3);
}

1 week ago | [YT] | 5

Geekific

What will be the output of the following code?
--------------------
public static void main(String[] args) {
String str = "abbcccddddeeeee";
StringBuilder result = new StringBuilder();
int c = 1;
for (int i = 1; i < str.length(); i++) {
if (str.charAt(i) == str.charAt(i - 1)) {
c++; continue;
}
result.append(c).append(str.charAt(i));
c = 1;
}
System.out.println(result);
}

2 weeks ago | [YT] | 3

Geekific

What will be the output of the following code?
--------------------
public static void main(String[] args) {
int[][] matrix = new int[][] {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}};
int rows = matrix.length, cols = matrix[0].length;
int[][] ans = new int[cols][rows];
for (int r = 0; r < rows - 1; ++r) {
for (int c = 0; c < cols - 1; ++c) {
ans[c][r] = matrix[r][c];
}
}
System.out.println(Arrays.deepToString(ans));
}

3 weeks ago | [YT] | 6

Geekific

What will be the output of the following code?
--------------------
public static void main(String[] args) {
List<String> list = Arrays.asList("one", "two", "three", "four");
Optional<String> result = list.stream().filter(s -> s.endsWith("e")).findAny();
System.out.println(result.orElse("none"));
}

1 month ago | [YT] | 9

Geekific

What will be the output of the following code?
--------------------
public static void main(String[] args) {
List<String> list = Arrays.asList("one", "two", "three");
String result = list.stream().reduce((s1, s2) -> String.valueOf(s1.length())).get();
System.out.println(Integer.parseInt(result));
}

1 month ago | [YT] | 1

Geekific

What will be the output of the following code?
--------------------
public static void main(String[] args) {
List<Integer> list = Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9);
int sum = list.stream().filter(n -> n % 2 == 1).mapToInt(Integer::intValue).sum();
System.out.println(sum);
}

1 month ago | [YT] | 2

Geekific

What will be the output of the following code?
--------------------
public static void main(String[] args) {
List<String> list = Arrays.asList("apple", "banana", "cherry");
String result = list.stream().filter(s -> s.matches(".*n.*")).findFirst().orElse("none");
System.out.println(result);
}

1 month ago | [YT] | 2

Geekific

What will be the output of the following code?
--------------------
public static void main(String[] args) {
List<Integer> list = Arrays.asList(3, 1, 4, 1, 5, 9);
int result = list.stream().sorted()
.collect(Collectors.collectingAndThen(
Collectors.toList(), l -> l.get(3))
);
System.out.println(result);
}

1 month ago | [YT] | 4

Geekific

What will be the output of the following code?
--------------------
public static void main(String[] args) {
List<String> list = Arrays.asList("apple", "banana", "cherry");
Boolean result = list.stream().allMatch(Pattern.compile("[a-z]{6}").asPredicate());
System.out.println(result);
}

2 months ago | [YT] | 4