Ask your self questions can help you think of what to measure, in order to get answers.
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:
- Operating System.
- Laptop.
- Convertible computer.
- Peripheral.
- Desktop Computer.
Explanation:
Operating system is a software that manages the hardware and the software in the system and provides the interface between machine and the user.
Laptops are the portable computing devices which you can carry with you.
Convertible computer have a keyboard that is detachable and can be converted into a tablet.
Peripherals are devices which we can attach to the computer.
Desktop computer is a computing device that not portable at all.
Answer:
What is the features of fifth generation computer?
Fifth Generation Computers
In the fifth generation, VLSI technology became ULSI (Ultra Large Scale Integration) technology, resulting in the production of microprocessor chips having ten million electronic components. This generation is based on parallel processing hardware and AI (Artificial Intelligence) software.