The column names and data types.
Information technology is the application of computers to store, retrieve, transmit and manipulate data, often in the context of a business or other enterprise.
Answer:
i. This value was not accepted because we have 12 months and not 13.
ii. This is because the user entered the value for the day as value for the month.
Explanation:
i. Why was this not accepted?
This value was not accepted because we have 12 months and not 13. The user entered a value that was above the maximum value registered for the number of months in a year- which is 12.
ii. Why do you think this error occurred
This is because the user entered the value for the day as value for the month.
This could be because the user uses a date system different from that of the program.
Answer:
This article shows how to use regex to remove spaces in between a String.
A string with spaces in between.
String text = "Hello World Java.";
We want to remove the spaces and display it as below:
Hello World Java.
1. Java regex remove spaces
In Java, we can use regex \\s+ to match whitespace characters, and replaceAll("\\s+", " ") to replace them with a single space.
Regex explanation.
`\\s` # Matches whitespace characters.
+ # One or more
StringRemoveSpaces.java
package com.mkyong.regex.string;
public class StringRemoveSpaces {
public static void main(String[] args) {
String text = "Hello World Java.";
String result = text.replaceAll("\\s+", " ");
System.out.println(result);
}
}
Output
Terminal
Hello World Java.
Answer:
Mouse - USB
Monitor - display port, HDMI, and thunderbolt port
External hard drive - USB and thunderbolt port
Flash drive - USB
Explanation:
A computer mouse is an input device used to interact with a computer system. It connects with the computer through the USB port.
A Monitor is an output device that is used to display information on a computer system. It can be connected to the system through the display ports, HDMI, and the thunder port.
The External hard drive is a storage device that holds data for a long period of time. It has adapters to connect to the computer through the USB ports or thunderbolt ports. The flash drive is similar in function to the hard drive but small in size and storage space. It only connects with the computer through USB ports.