Found 9326 Articles for Object Oriented Programming

Checking Last Modification of a File on the Server in Java

Way2Class
Updated on 01-Aug-2023 12:04:20

168 Views

Last Modification of a File Many computer programs rely on the critical aspect of accessing and modifying files on a server in today's digital age. Yet, in order to guarantee the utilization of the latest information, it is frequently imperative to determine the last modification time of a file. Several strategies exist in Java for confirming the last modification of a file on a server, all of which have their benefits and drawbacks. Method 1: (Using file.lastModified) Accessing various file properties in Java can be done using the File class, including checking the last modification of a server ... Read More

Concurrent Programming Approach using Lambda Expressions

Way2Class
Updated on 01-Aug-2023 12:03:05

57 Views

An important addition to Java SE 8 is the lambda expressions feature. A clear and concise expression of method interfaces is possible using expressions. The collection library is extremely helpful. Collections can be iterated, filtered and have data extracted for useful purposes. To implement functional interfaces, lambda expressions are used widely. A lot of code is saved by it. Lambdas expressions allow us to provide the implementation without having to redefine the method. Only the implementation code takes shape in this place through writing. The compiler does not create a. Because Java lambda expressions ... Read More

JPMS: Java Platform Module System

Way2Class
Updated on 01-Aug-2023 12:00:49

164 Views

JPMS stands for Java Platform Module System. It is the new feature in Java 9. Our java applications and Java packages may be packaged into Java Modules with the aid of Java Module System. The Java Module allows us to designate which of the module’s packages and other Java Modules should be able to see. A Java Module also lists the Java Modules it needs in order to function. The Java Platform System is also known as Java Jigsaw or Project Jigsaw. Jigsaw's name was used at the time of its development. The main intention of developing this is to ... Read More

JODA- Time

Way2Class
Updated on 01-Aug-2023 12:00:00

126 Views

JODA- Time is an API developed by joda.org which provides better classes and more effective methods for handling date and time than classes from java. util package like calendar, Gregorian calendar, date, etc. It is included in Java 8.0 with the java.time package. To include, we need to import following − import java.time.*; Basic Features of JODA- Time Some of the features of JODA- Time are mentioned below − Simple field accessors are used, such as getYear(), getDayofWeek(), and getDayofYear() It supports seven different calendar systems including, Julian, Islamic, Gregorian, Coptic, Ethiopic, Buddhist and Gregorian-Julian. Option to develop ... Read More

JEP Package Tool in Java

Way2Class
Updated on 01-Aug-2023 11:59:00

133 Views

JEPs, or Java Enhancement Proposals, are ideas for enhancing the Java platform. The JEP Package Tool is one such improvement that enables programmers to package Java programs as native executables. The creation of native executables from Java programs is possible through the implementation of the JEP Package Tool by developers. Doing so grants independence to these executable files that eliminate dependency on a Java Virtual Machine (JVM) or other associated software components. The advent of this powerful tool began in Java 14 through its introduction as an experimental feature. Syntax for Using JEP Package Tool The JEP Package Tool's syntax ... Read More

JavascriptExecutor in Selenium

Way2Class
Updated on 01-Aug-2023 11:57:45

657 Views

Selenium is a well-known open source, web-based automation tool used by many. But sometimes it faces problems when interacting with certain elements; perhaps an unexpected pop-up window will hinder the web-driver from performing operations and generate wrong results. This is where JavascriptExecutor proves to be a key factor in such a situation, enabling the web driver to successfully perform the desired operations. Its complexity and bursts, working side by side, make this situation much easier to tackle. What is JavascriptExecutor in Selenium? Using the interface named JavascriptExecutor one can execute JavaScript via Selenium and to interact with HTML within a ... Read More

Javap tool in Java with examples

Way2Class
Updated on 01-Aug-2023 11:55:15

190 Views

The javap tool is a useful means of retrieving the information of a specific class or interface. Through its capabilities of disassembling, the javap command—also known as the Java Disassembler—has been given the roles of providing users with comprehensive internal info. From the two options, -c or -verbose, each giving unique results, users are able to find themselves in the realms of byte code and byte code orchestration. If no options are used, javap runs through the public, protected and package fields and methods of inputted classes. Syntax javap [option] [classname] When no options are used Example javap class_name ... Read More

Java Stream API Filter

Way2Class
Updated on 01-Aug-2023 11:53:01

173 Views

A stream made up of the items of this stream that meet the specified predicate is returned by the stream filter function. It is a middle level operation. These actions are always lazy, I.e., running a filter function or other intermediary operations doesn’t really filter anything; instead, it generates a new stream that, when traversed, includes the items of the initial stream that satisfy the provided predicate. Syntax Stream filter(Predicate

Java Source File Structure

Way2Class
Updated on 01-Aug-2023 09:58:15

1K+ Views

It is used to describe that the Java Source Code file must follow a scheme or structure. The maximum number of classes that may be declared as public in a Java program is one. If a public class exists, the program’s name and the name of the public class must match for there to be no compile time errors. There are no limitations when using any name as the name of the Java source file if there is no public class. In this article, we will see some instructions that a Java program must follow. Structure of Java Program ... Read More

Java Sound API

Way2Class
Updated on 01-Aug-2023 11:22:42

410 Views

Java sound is a bunch of classes and interfaces. It is a low-level API which is used for effecting and controlling the input and output of sound media and Musical Instrument Digital Interface (MIDI) data. It offers explicit control over the capabilities generally needed for sound input and output, in a framework that promotes extensibility and flexibility. It consists of two packages namely, javax.sound.sampled and javax.sound.midi. Who is the Java Sound API designed for? The Java Sound API satisfies the requirements of a broad spectrum of application developers because sound is such a crucial component. Possible application domains comprise − ... Read More

Advertisements