Skip to content
Code_Underscored_logo
  • Python
  • Django
  • Web Development
  • Machine Learning
  • C++
  • Java
Code_Underscored_logo
  • read a text file in Python
    Python

    How to read a text file in Python

    ByHumphrey May 29, 2022March 2, 2024

    Before reading a file, you should familiarize yourself with the world of files. You want to know what a computer software sees when dealing with files. It makes it easy for you to comprehend and construct file-reading logic.

    Read More How to read a text file in PythonContinue

  • current timestamp in Java
    Java

    How to get the current timestamp in Java

    ByLucy May 29, 2022March 2, 2024

    In Java, getting the current timestamp is simple. We’ll learn how to acquire the timestamp using the Date and Timestamp classes in this lesson. This article provides some Java examples for obtaining the current date, time, or timestamp. In addition, Java 8 has been included.

    Read More How to get the current timestamp in JavaContinue

  • Python String Replace method
    Python

    Python String Replace method with examples

    ByHumphrey May 28, 2022March 2, 2024

    The replace() method is responsible for substituting one phrase for another. If nothing else is supplied, all occurrences of the specified phrase are substituted. replace() is a Python built-in function that returns a string copy with all occurrences of a substring replaced with another substring.

    Read More Python String Replace method with examplesContinue

  • TreeMap in Java
    Java

    TreeMap in Java

    ByLucy May 28, 2022March 2, 2024

    Besides the AbstractMap Class, Java’s TreeMap discreetly implements the Map interface and NavigableMap. Depending on which constructor is used, the map is sorted either by the natural ordering of its keys or by a Comparator specified at map creation time.

    Read More TreeMap in JavaContinue

  • Encapsulation in Java
    Java

    Encapsulation in Java

    ByLucy May 25, 2022March 2, 2024

    In Java, encapsulation combines data (variables) and code that acts on the data (methods) into a single unit. Encapsulation means that a class’s variables are concealed from other classes and can only be accessed through its current class’s methods. Consequently, it’s also known as data concealment.

    Read More Encapsulation in JavaContinue

  • HashSet in Java
    Java

    HashSet in Java explained with examples

    ByLucy May 24, 2022March 2, 2024

    The Set interface has its implementation handled by the HashSet class, supported by a hash table that is a HashMap instance. The iteration order of the Set is not guaranteed, which means that the class does not guarantee the same order of elements across time.

    Read More HashSet in Java explained with examplesContinue

  • Java Ternary Operator
    Java

    Java Ternary Operator with examples

    ByLucy May 24, 2022March 2, 2024

    The Java ternary operator allows you to build a single-line if statement. True or false can be the result of a ternary operator. Whether the statement evaluates to true or false, it returns a certain result.

    Read More Java Ternary Operator with examplesContinue

  • Python time.time method
    Python

    How to use Python time.time() method

    ByHumphrey May 22, 2022March 2, 2024

    The time’s Python time() Python method returns the time in seconds since the epoch in UTC as a floating-point number. Although the time is always supplied as a floating-point number, not all systems give time with an accuracy greater than one second. While this function generally provides non-decreasing values, it may return a lower value if the system clock has been reset between the two calls.

    Read More How to use Python time.time() methodContinue

  • Python While Loop statements
    Python

    Python While Loop statements with examples

    ByHumphrey May 22, 2022March 2, 2024

    Loops are a useful and commonly used feature in all modern programming languages. A loop is the finest solution for automating a specific repeated operation or preventing yourself from writing repetitive code in your programs. In fact, loops are a collection of instructions that repeat until a condition is met.

    Read More Python While Loop statements with examplesContinue

  • HashMap in Java
    Java

    HashMap in Java with examples

    ByLucy May 22, 2022March 2, 2024

    Since Java 1.2, HashMap has been part of the Java collection. The java.util package contains this class. It implements the Java Map interface in its most basic form. It holds data as (Key, Value) pairs that can be accessed using a different index type (e.g., an Integer). A key (index) refers to another object (value). Trying to insert the duplicate key overwrites the associated key’s element.

    Read More HashMap in Java with examplesContinue

  • PriorityQueue in Java
    Java

    PriorityQueue in Java explained with examples

    ByLucy May 22, 2022March 2, 2024

    In Java, a priority queue is a special form of the queue in which all components are ordered either by their natural ordering or by a custom Comparator provided at the time of construction. Before talking about priority queues, let’s look at what a regular queue is.

    Read More PriorityQueue in Java explained with examplesContinue

  • Python List Comprehension with examples
    Python

    Python List Comprehension with examples

    ByHumphrey May 20, 2022March 2, 2024

    In Python, a list is a built-in data structure that represents a collection of data points enclosed in square brackets. Lists can be used to hold any form of data or a mix of data types. In Python, lists are one of the four built-in data structures. Tuples, dictionaries, and sets are examples of other data structures.

    Read More Python List Comprehension with examplesContinue

Page navigation

Previous PagePrevious 1 … 5 6 7 8 9 … 32 Next PageNext
  • About Us
  • Contact Us
  • Disclaimer
  • Privacy Policy

© 2025 Code Underscored. All Rights Reserved.

A PART OF VIBRANT LEAF MEDIA COMPANY.

  • Python
  • Django
  • Web Development
  • Machine Learning
  • C++
  • Java
Search