• 30 March

    Implement isPrime method in java

    In this post, we will implement isPrime method. isPrime method will take an integer as input and determine whether the number is prime or number. A prime number is a number which has only two divisors 1 and itself. To check if the number is prime or not, we need to see if it has any […]

  • 30 March

    java random number between 1 and 10

    We have already seen random number generator in java.In this post, we will address specific query on how to generate random number between 1 to 10. Using random.nextInt() to generate random number between 1 and 10 We can simply use Random class’s nextInt() method to achieve this. As the documentation says, this method call returns "a […]

  • 27 March

    Could not find or load main class

    In this post, we will discuss Could not find or load main class. Did you get this error before? If you have good amount of experience in Java programming or as a novice java developer, you might have encountered this error: Could not find or load main class. Before we understand about this error, let’s first […]

  • 10 March

    Print pyramid pattern: 1 3*2 4*5*6 pattern in java

    In this post, we will see how to print the following pyramid pattern. Problem Input : n = 4 Output : 1 3*2 4*5*6 10*9*8*7Input : n = 5 Output : 1 3*2 4*5*6 10*9*8*7 11*12*13*14*15 Solution If you notice the pattern we need to print odd rows in increasing order and even rows in […]

  • 06 February

    Java FileWriter Example

    The FileWriter class of java.io package makes writing to files in Java as easy as A-B-C. The FileWriter class writes to files as a stream of characters instead of bytes(as in FileOutputStream). Like its input-oriented counterpart FileReader, the FileWriter class is intended for writing “text” based files one character at a time. Let us look […]

  • 05 February

    Java program to find permutation and combination (nCr nPr)

    In this tutorial, we will see java program to find permutation and combination. Permutation is represented as nPr and Combination is represented as nCr.It is simple program which involves factorial of the numbers. Here is formula to find permutation and combination (nCr nPr). nPr = factorial(n) / factorial(n-r) nCr = factorial(n)/(factorial(n-r) * factorial(r)) [crayon-6a299b2f094d5147380050/] Output: Enter […]

  • 30 January

    Difference between early binding and late binding in java

    Binding in Java refers to the process of associating a method or function body with a method or function call by the Java Compiler. In simpler words, when a function is called by the Java compiler the task of correctly locating the method for the respective function is binding. Depending on when the compiler is […]

  • 16 December

    Betibet stavnice: praktični vodič za registracijo in bonuse

    Preden položite denar na katero koli spletno igralnico, si vzemite pet minut in preberite ta kontrolni seznam – pokriva korake, ki jih večina igralcev preskoči. Predpogoji Stabilna internetna povezava – brez prekinitev med registracijo ali igranjem. Veljaven e-poštni naslov za potrditev računa in prejemanje promocij. Osebni dokument (osebna izkaznica ali potni list) za postopek KYC […]

  • 06 December

    Galactic Wins Login: Step-by-Step Guide to Bonuses & Wagering

    Getting started with Galactic wins login is straightforward once you know the steps — this guide walks you through each one. Prerequisites A valid email address and a phone number for verification. Government-issued ID for KYC (passport, driver’s license, or national ID). A stable internet connection and a modern browser or mobile device. Payment method: […]