Telematics: Definition, Tools, Applications, and Examples

Shirjeel Yunus
Updated on 30-Sep-2024 11:55:43

622 Views

What is Telematics? Telematics is a combination of two technologies which include telecommunications and informatics. Telecommunications includes phone lines and cables while computer systems are included in informatics. The telematics technology is used in commercial fleet vehicles. The data is transmitted during the vehicle movement with the help of wireless telematics devices and black box technologies. The data that is transmitted include − Usage of the vehicle Maintenance Servicing Fleet management can also be performed with the help of telematics. The technology can be used to get the knowledge of vehicles in the entire fleet related to their ... Read More

Render HTML String Preserving Spaces and Line Breaks

Tanya Sehgal
Updated on 30-Sep-2024 09:54:39

279 Views

Sometimes while writing the content of an HTML file, there might be the need to preserve blank spaces and line breaks. You might have noticed when you try to write something in the paragraph tag or the tag that has a lot of white spaces or a line break, it is not visible when the HTML page is rendered in the web browser. This article will show how to preserve those spaces while rendering the HTML page. Render an HTML String Preserving Spaces and Line Breaks Using HTML pre Tag ... Read More

Java Regex to Exclude a Specific String Constant

Arnab Chakraborty
Updated on 29-Sep-2024 02:51:09

2K+ Views

In this program, we will use a regular expression to check if a given string does not contain the substring "kk" using Java. The regular expression ^((?!kk).)*$ is designed to match strings that do not include the "kk" pattern anywhere in the string. The program will evaluate a sample string and print whether or not it contains "kk". Problem Statement Write a program in Java for checking whether a given string contains the substring "kk." If the string does not contain "kk" the program will return true otherwise it will return false. Input String s = "tutorials" Output true ... Read More

Find Longest Common Prefix Using Word by Word Matching in Java

Prabhdeep Singh
Updated on 29-Sep-2024 02:50:52

945 Views

In this article, we will explore how to find the longest common prefix among a given set of strings using two different approaches in Java. We will first discuss an approach that compares all strings directly to find the longest prefix and then move to a word-by-word matching approach.  Problem Statement We are given a set of strings and we have to find the common prefix among all of them. A prefix is a substring for a string that contains the zero index and could be of any length from 1 to a complete string. Input 1 string arr[] = ... Read More

Java SQL Date setTime Method with Example

Arushi
Updated on 29-Sep-2024 02:50:39

949 Views

In this program, we will connect to a MySQL database using JDBC, insert a new record into the dispatches table, and retrieve all records from the table. The setTime() method from Date class of java.util package that accepts a variable of long type, representing the number of milliseconds from the epoch time (January 1, 1970, 00:00:00.000 GMT) to the required time, and sets the specified time value to the current Date object. //Setting time date.setTime(time_value_in_long); The goal of the program is to demonstrate how to interact with a database using JDBC and handle Date and Time objects in Java. ... Read More

Binary Search Implementation on Char Array in Java

Anvi Jain
Updated on 29-Sep-2024 02:49:49

1K+ Views

In this article, we will learn to implement binary search on char array using Java. The binary search on a char array can be implemented by using the Arrays.binarySearch() method of java.util package. This method returns the index of the required char element if it is available in the array, otherwise, it returns (-(insertion point) - 1) where the insertion point is the position at which the element would be inserted into the array. Problem Statement Write a program in Java to implement binary search on char array Input 'b', 's', 'l', 'e', 'm' Output The sorted array is: b ... Read More

Increase Row Height in JTable

George John
Updated on 29-Sep-2024 02:48:44

2K+ Views

In the given article, we will learn to write a program in Java to increase the row height in a JTable. The example creates a table with different languages and their difficulty levels and then modifies the row height using the setRowHeight() method. Steps to increase the row height in a JTable  Following are the steps to increase the row height in a JTable − Import the necessary classes from javax.swing package. Initialize a DefaultTableModel and create a JTable with it. Add columns to represent languages and ... Read More

Iterate Through Each Character of a String in Java

AmitDiwan
Updated on 29-Sep-2024 02:48:31

2K+ Views

In this article, we will understand how to iterate through each character of the string using Java. The string is a datatype that contains one or more characters and is enclosed in double quotes (“ ”). Char is a datatype that contains an alphabet an integer or a special character. Problem Statement Write a program to Iterate through each character of the string. Below is a demonstration of the same − Input The string is defined as: Java Program Output The characters in the string are: J, a, v, a, , P, r, o, g, r, a, m, Different approaches ... Read More

Sort ArrayList in Ascending Order in Java

AmitDiwan
Updated on 29-Sep-2024 02:48:17

1K+ Views

In this article, we will learn how to sort an ArrayList in ascending order using Java. Sorting allows us to arrange elements in a specific order. We will use the Collections.sort() method, which simplifies sorting, whether you're dealing with integers or strings. The program will demonstrate sorting an ArrayList of numbers and names in ascending order. Problem Statement Write a Java program that sorts an ArrayList of elements in ascending order. We'll look at two examples—one with integer values and another with string values. Input 1 Points[50, 29, 35, 11, 78, 64, 89, 67] Output 1 Points (ascending)[11, 29, 35, ... Read More

Find Area of a Trapezium in Java

AmitDiwan
Updated on 29-Sep-2024 02:48:03

865 Views

In this article, we will understand how to find the area of a trapezium using Java. The trapezium is a type of quadrilateral that has at least one pair of sides parallel to each other. The parallel sides of a trapezium are called bases and the non-parallel sides of a trapezium are called legs. It is also called a trapezoid. The area of a trapezium is calculated using the formula − (height/2 * (side_1 + side_2). i.e. Area = ½ x (sum of the lengths of the parallel sides) x perpendicular distance between parallel sides Below is a demonstration of ... Read More

Advertisements