• Java 8 Method reference
    22 April

    Java 8 Method reference

    Java 8 has introduced a lot of new features such as lambda expressions, stream, Method references etc. In this post, we will see what are Method references and how can we use it. I will try to provide more examples rather than theory. 1. Introduction to Method Reference Method references are special types of lambda […]

  • 21 April

    Cannot find symbol Java

    In this post, we will see how to solve Cannot find symbol in java. You will get this error when you have declared something that compiler does not understand. The compiler creates list of identifiers when you compile any program. If compile can not understand any of the identifiers, you will get this error. This […]

  • 21 April

    Python Print without Newline

    In this post, we will see how to print without Newline in Python. In python, when you use two print statements consecutively, it will print in different line. [crayon-678963f39c406612978444/] Output: Hello world from Java2blog As expected, we got Hello world and from Java2blog If you want to print these two print statements in the same […]

  • 21 April

    How to view HTTP headers in Google Chrome?

    In this post, we will see how to view HTTP headers in Google Chrome. Here are the steps to view HTTP headers in google chrome. Right-click on the webpage and select Inspect. Click on Network tab. Pick any HTTP request from left panel and click on headers to view HTTP header. You will be able […]

  • 21 April

    Remove first element from list in Python

    In this post, we will see how to remove the first element from a list in python. Using list.pop() We can use list.pop() method to remove the first element from the list. [crayon-678963f39c4dd417587353/] Output: List Of Fruits are: [‘Orange’, ‘Apple’, ‘Grapes’, ‘Mango’] List Of Fruits after removing first element: [‘Apple’, ‘Grapes’, ‘Mango’] Removed Fruit: Orange […]

  • 07 April

    TypeError: ‘NoneType’ object is not iterable

    In this post, we will see about TypeError: NoneType object is not iterable. You will get this error if you are iterating over object of type None in for or while loop. Let’s understand with help of example. [crayon-678963f39c7dc255457196/] If countryList is of type None, then you can get this error. Let’s see a scenario […]

  • 07 April

    TypeError: unhashable type: ‘list’

    In this post, we will see about TypeError: unhashable type: 'list'. You will get this error when you are trying to put list as key in dictionary or set because list is unhashable object.TypeError: unhashable type is generally raised when you try to hash object which is unhashable. Let’s see this with help of example: […]

  • 07 April

    Indexerror: list Index Out of Range

    In this post, we will see about Indexerror: list Index Out of Range in Python. While working with list, you can access its elements by its index. You will get this error when you are trying to access an index that does not exist. Let’s see with the help of example. [crayon-678963f39cef4215977026/] Output: [crayon-678963f39cef8559192695/] You […]

  • 07 April

    Valueerror: Invalid literal for int() with base 10

    In this post, we will see about Valueerror: Invalid literal for int() with base 10. You will see this error, when you are trying to convert string to int using int() function. If you provide invalid string input to int() function, you will get this error. Here is the slider to understand it better. [smartslider3 […]