- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 9291 Articles for Object Oriented Programming
2K+ Views
Following is the code to implement Checksum using Java −Example Live Demoimport java.util.*; public class Demo{ public static void main(String args[]){ Scanner my_scan = new Scanner(System.in); System.out.println("Enter the input string "); String my_in = my_scan.next(); int my_checksum = generate_checksum(my_in); System.out.println("The checksum that has been generated is " + Integer.toHexString(my_checksum)); System.out.println("Enter the data that needs to be sent to the receiver "); my_in = my_scan.next(); System.out.println("Enter the checksum that needs to be sent to the receiver "); ... Read More
5K+ Views
We can convert a hex string to byte array in Java by first converting the hexadecimal number to integer value using the parseInt() method of the Integer class in java. This will return an integer value which will be the decimal conversion of hexadecimal value. We will then use the toByteArray() method of BigInteger class that will return a byte array.Example Live Demoimport java.math.BigInteger; public class Demo { public static void main(String args[]) { String str = "1D08A"; int it = Integer.parseInt(str, 16); System.out.println("Hexadecimal String " + str); ... Read More
548 Views
Implicit is the default waiting time for each test step in our execution. Thus if we keep an implicit wait of ten seconds, each test step will wait for that amount of time for an action to take place and then move to the next step.Implicit wait is a dynamic wait which means if the wait time is ten seconds and the web element on which the next action is to be taken is available at the fifth second, then control will immediately move to the next test step rather than waiting for the full ten seconds.However if the element ... Read More
8K+ Views
The differences between get() and navigate() methods are listed below.sl.no.get()navigate()1It is responsible for loading the page and waits until the page has finished loading.It is only responsible for redirecting the page and then returning immediately.2It cannot track the history of the browser.It tracks the browser history and can perform back and forth in the browser.ExampleWith get().import org.openqa.selenium.By; import org.openqa.selenium.Keys; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.chrome.ChromeDriver; import java.util.concurrent.TimeUnit; import java.util.List; public class LaunchBrw { public static void main(String[] args) { System.setProperty("webdriver.chrome.driver", "C:\Users\ghs6kor\Desktop\Java\chromedriver.exe"); WebDriver driver = new ChromeDriver(); String url = "https://www.tutorialspoint.com/index.htm"; ... Read More
145 Views
We are given with a number let’s say, num and the task is to calculate the divisor of a given number thereby count the divisors of num that have at least one digit common with n.Input − num = 24Output − Count is 4Explanation − we will perform the following steps −Firstly, calculate the divisors of a given numberDivisors of 24 are − 1, 2, 3, 4, 6, 8, 12, 24Secondly, check which divisor have at least one digit that matches with the digits of a number2, 4, 12, 24 are the divisors that contain the digit that matches with ... Read More
517 Views
The javafx.scene.XYChart class is the base class of all the charts that are plotted in an x-y pane. By instantiating the subclasses of this class you can create various XY charts namely − line chart, area chart, bar chart, pie chart, bubble chart, scatter chart, etc.In the XY chart, the given data points are plotted on an XY plane. Along the x and y axes, you will have the tick marks and labels. The labels specify the names (or numbers) of the values.Changing the color of the tick marksThe javafx.scene.chart.Axis class (abstract) is the base class of all the axes ... Read More
226 Views
The javafx.scene.XYChart class is the base class of all the charts that are plotted in an x-y pane. By instantiating the subclasses of this class you can create various XY charts namely − line chart, area chart, bar chart, pie chart, bubble chart, scatter chart, etc.In the XY chart, the given data points are plotted on an XY plane. Along the x and y axes, you will have the tick marks and tick labels. The tick marks represent various values with uniform intervals.Removing the tick marksThe javafx.scene.chart.Axis class (abstract) is the base class of all the axes in XY charts. ... Read More
344 Views
The javafx.scene.XYChart class is the base class of all the charts that are plotted in an x-y pane. By instantiating the subclasses of this class you can create various XY charts namely − line chart, area chart, bar chart, pie chart, bubble chart, scatter chart, etc.In the XY chart, the given data points are plotted on an XY plane. Along the x and y axes, you will have the tick marks and tick labels. The tick marks represent various values with uniform intervals.Changing the length of the tick marksThe javafx.scene.chart.Axis class (abstract) is the base class of all the axes ... Read More
575 Views
The javafx.scene.XYChart class is the base class of all the charts that are plotted in an x-y pane. By instantiating the subclasses of this class you can create various XY charts namely − line chart, area chart, bar chart, pie chart, bubble chart, scatter chart, etc.In the XY chart, the given data points are plotted on an XY plane. Along the x and y axes, you will have the tick marks and tick labels. The labels specify the names (or numbers) of the values.Changing the color of the tick labelsThe javafx.scene.chart.Axis class (abstract) is the base class of all the ... Read More
89 Views
The bubble chart accepts a series of data points (x, y) as input values and, creates bubbles for the data points in the given series. In JavaFX, you can create a bubble chart by instantiating the javafx.scene.chart.BubbleChart class.Generally, in all X-Y charts, the data points plot two values (x, y). In the bubble chart, there is a third value which is represented by the radius of the bubble. This chart comes handy while plotting the data points in 3 dimensions.Anyhow, it is not mandatory to have the third value, it is only optional. Like any other XY chart, you can ... Read More