Moumita has Published 175 Answers

What is scatternet?

Moumita

Moumita

Updated on 27-Apr-2020 07:12:03

A scatternet is a type of Bluetooth network that is formed by the interconnection between two or more individual Bluetooth networks, called piconets. The devices in the scattered should be Bluetooth enabled so that they can communicate wirelessly over a short range of within 10m radius using ultra-high frequency (UHF) ... Read More

Bluetooth Architecture

Moumita

Moumita

Updated on 27-Apr-2020 07:09:57

Bluetooth is a network technology that connects mobile devices wirelessly over a short range to form a personal area network (PAN). They use short-wavelength, ultra-high frequency (UHF) radio waves within the range 2.400 to 2.485 GHz, instead of RS-232 data cables of wired PANs.There are two types of Bluetooth networks ... Read More

Java string length without using length() method.

Moumita

Moumita

Updated on 26-Feb-2020 08:27:58

To calculate the length of the string convert the string to a character array and count the number of elements in the array.ExampleLive Demopublic class StringLength {    public static void main(String args[]) throws Exception {       String str = "sampleString";       int i = 0; ... Read More

Java String replace() method example.

Moumita

Moumita

Updated on 26-Feb-2020 08:11:21

The replace() method of the String class accepts two parameters namely −oldChar − the old character. newChar − the new character.returns a new String resulting from replacing all occurrences of oldChar in this string with newChar.ExampleLive Demoimport java.io.*; public class Test {    public static void main(String args[]) {     ... Read More

Java String equals() method example.

Moumita

Moumita

Updated on 26-Feb-2020 07:40:02

The equals() method of the String class accepts a String as a parameter and it compares the current string to the specified object. The result is true if and only if the argument is not null and is a String object that represents the same sequence of characters as this ... Read More

Case sensitive string comparison in Java.

Moumita

Moumita

Updated on 26-Feb-2020 06:45:45

You can compare two strings using either equals() method or compareTo() method.Where, The equals() method compares this string to the specified object.The compareTo() method compares two strings lexicographically. The comparison is based on the Unicode value of each character in the strings.These two methods compare the given strings with respective ... Read More

How to create String object in Java?

Moumita

Moumita

Updated on 26-Feb-2020 05:55:48

You can create a String by -Assigning a string value wrapped in " " to a String type variable.String message = "Hello Welcome to Tutorialspoint";Creating an object of the String class using the new keyword by passing the string value as a parameter of its constructor.String message = new String ... Read More

Java String Class Tutorial

Moumita

Moumita

Updated on 26-Feb-2020 05:45:42

The java.lang.String class represents character strings. All string literals in Java programs, such as "abc", are implemented as instances of this class. Strings are constant, their values cannot be changed after they are created.Examplepublic class StringDemo {    public static void main(String args[]) {       String string1 = ... Read More

Capturing groups and back references in Java Regex

Moumita

Moumita

Updated on 25-Feb-2020 07:11:20

Capturing groups are a way to treat multiple characters as a single unit. They are created by placing the characters to be grouped inside a set of parentheses. For example, the regular expression (dog) creates a single group containing the letters "d", "o", and "g".Capturing groups are numbered by counting ... Read More

How to convert a String into int in Java?

Moumita

Moumita

Updated on 19-Feb-2020 12:45:00

The Integer wrapper class of the java.lang package provides a method named parseInt() using this method you can convert a String variable to an integer variable.ExampleLive Demopublic class Test {    public static void main(String args[]) {       String data = "123";       int num = ... Read More

Advertisements