Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Java Logical Coding Puzzles
Rating: 4.6 out of 5(133 ratings)
5,579 students

Java Logical Coding Puzzles

Understand the concept with real program
Created byChirag Khimani
Last updated 1/2022
English
English [Auto],

What you'll learn

  • This puzzles will help you to clear your programming concept practically
  • You'll able to understand the concept in detail using real time java program
  • You'll able to think different possible way to think one concept differently
  • You'll able to clear any programming interviews
  • It'll help you to build your programming logic

Course content

1 section32 lectures1h 53m total length
  • Java Coding Puzzle - 13:14

    Explore Java method overloading and common compile-time errors in a coding puzzle, including ambiguity and errors like cannot find symbol when calling overloaded methods with int and double parameters.

  • Java Coding Puzzle - 24:32

    Solve the Java coding puzzle on your own, then compare your reasoning to the explanation to see how each object's count increments to 1, yielding 1 1 1.

  • Java Coding Puzzle - 36:50

    Explore dynamic polymorphism in Java through a channel-access analogy, learning how overriding and reference types affect which methods are callable, and why certain combinations trigger compilation errors.

  • Java Coding Puzzle - 44:53

    Explore dynamic polymorphism in Java with a vehicle and car class, showing how a parent reference accesses overridden driver and play music methods in the child.

  • Java Coding Puzzle - 56:03

    Demonstrates dynamic polymorphism in Java with a parent class reference to a car class, explains overriding and hiding of instance vs static methods and max speed values.

  • Java Coding Puzzle - 62:43

    Solve a Java coding puzzle by examining static versus local variable scope in the main method to pinpoint a compilation error and why local variables cannot be static.

  • Java Coding Puzzle - 73:30

    Explore how Java passes a parameter by value in a static context, showing that changing a method parameter does not alter the static variable, so the output remains ten.

  • Java Coding Puzzle - 88:28

    Explore operator precedence and associativity in Java through a step-by-step puzzle, learning how plus with strings and integers affects evaluation and when errors arise.

  • Java Coding Puzzle - 91:52

    Solve a Java coding puzzle by exploring how the main method can use only static members, identify a compilation error, and learn why a function must be static.

  • Java Coding Puzzle - 131:43

    Understand how static and local variables interact in Java, where a local variable hides the static one when printing. Learn why an uninitialized local variable triggers a compilation error.

  • Java Coding Puzzle - 151:26

    Diagnose a Java coding puzzle that reveals a compilation error from a missing abstract method, and explore upcasting, overriding, and polymorphism in a pen-in-glass example.

  • Java Coding Puzzle - 163:27

    Explores a Java coding puzzle that prints numbers from 1 to 20 divisible by 3 or 5, reveals double printing of 15, and suggests using else-if to avoid duplicates.

  • Java Coding Puzzle - 171:24

    Explore a Java coding puzzle that predicts a compilation error when a boolean enters a switch, and learn by attempting first, then reviewing the explanation about equals versus memory address.

  • Java Coding Puzzle - 183:02

    Explore how Java string literals and new string objects occupy memory differently and how the equals operator compares references, yielding false or true outputs based on object creation.

  • Java Coding Puzzle - 194:34

    Explore Java string handling and memory by comparing string literals and objects, and distinguish equals from the equals method versus the == operator to determine content versus reference equality.

  • Java Coding Puzzle - 201:59

    Solve a java coding puzzle focused on dynamic polymorphism, identify lines that trigger compiler errors when instantiating an abstract class, and learn by comparing your solution to the explanation.

  • Java Coding Puzzle - 214:31

    Explore dynamic polymorphism with a parent class reference to a child object. See how explicit casting can remove compile-time errors but risk runtime exceptions.

  • Java Coding Puzzle - 222:42

    Explore how static vs local variables are initialized in Java, confirm default values for arrays, and why dereferencing null leads to a null pointer exception at runtime.

  • Java Coding Puzzle - 232:33

    Explore how static versus abstract methods affect overriding in Java, highlighting a compilation error when a static method is overridden, and how dynamic polymorphism yields the stay safe output.

  • Java Coding Puzzle - 243:26

    Solve a Java inheritance puzzle by testing if a car extends a vehicle with a parameterized constructor and drive method, revealing a compile error when child lacks a super call.

  • Java Coding Puzzle - 254:13

    Learn how parent and child classes require calling a parent constructor from the child using super; in all constructors, call super to avoid compilation errors.

  • Java Coding Puzzle - 273:19

    Study a Java coding puzzle by tracing a for loop that increments count to 11, producing an output of 11 and 11, and compare your reasoning with the explanation.

  • Java Coding Puzzle - 282:02

    In this Java coding puzzle, attempting to print the loop variable outside a for loop triggers a compilation error, illustrating variable scope rules and common mistakes.

  • Java Coding Puzzle - 292:09

    Trace a Java coding puzzle by stepping through a for loop with an early break, incrementing count, and predicting the program output as 1 followed by 0.

  • Java Coding Puzzle - 304:22

    Explore constructor chaining in Java by examining how child class constructors must call the parent constructor with arguments using super, otherwise compilation errors occur; practice with a practical example.

  • Java Coding Puzzle - 312:34

    Solve a Java coding puzzle about type conversions—store an int into a double and use explicit casting to convert back, first solving yourself, then compare with the explanation for learning.

  • Java Coding Puzzle - 325:33

    Explore a Java coding puzzle by evaluating the program output through operator precedence. Understand left-to-right associativity and boolean short-circuit logic, arriving at the final output of 20.

  • Java Coding Puzzle - 333:45

    Analyze a Java coding puzzle by applying operator precedence and left-to-right associativity for multiplication and division, and explore short-circuit evaluation of logical operators to predict the program output.

  • Java Coding Puzzle - 343:38

    Explore a Java coding puzzle that tests understanding of pre-increment and post-increment operators, evaluation order, and resulting output through a step-by-step left-to-right expression.

  • Java Coding Puzzle - 354:25

    Solve a Java coding puzzle focused on an index out of bounds error and mastering exception handling through dynamic polymorphism; compare approaches with expert explanations.

  • Java Coding Puzzle - 362:15

    Explore a Java coding puzzle on static methods, arrays with values 10, 20, 30, and how a finally block executes to print 30 as the output.

  • Java Coding Puzzle - 371:59

    Learn how a Java finally block executes after a try, demonstrated by accessing an array element at index two that yields 43 and printing 43 before the finally block runs.

Requirements

  • You need basic understanding of Java programming
  • You'll also need Object Oriented Programming Concept

Description

We cannot learn how to drive a car just by learning theories. We've to see in real-time to get more understanding & confidence. Because driving a car is a skill or is an art which we need to perform ourselves.


Similarly, programming is an art and we need to learn it by doing brainstorming using pen & paper. We've to solve as many examples as possible to get expertise on it. Generally, we learn many java concepts especially Object-Oriented concepts but we're getting confused when we see them in the programs or we don't have an idea how to implement them because we don't have enough examples to practice.


After solving these puzzles,

1) You'll be able to Brainstorm on different java concepts with real-time examples which will build your confidence and you'll be able to understand the concepts in a better way.
2) You'll be able to visualize each concept as you'll see different examples of the same concepts
3) You'll get 360 degrees understanding of concepts as we've designed these challenges in a way that it'll give you almost all possible use of each concept
4) You'll be able to clear most interviews as all these challenges are very important with respect to interviews

I hope you'll gonna enjoy these challenges & feel free to share your feedback. Happy learning!

Who this course is for:

  • Any programmer who knows java theatrically but facing difficulties implementing concepts real time
  • Any programmer who is preparing for programming interviews