compiler error in Selenium

0 votes
'self pace module 2, function created from page 44. See attachment for screen shot of compiler error '

Note : Screen-shot of the error.
Dec 18, 2017 in Data Analytics by Learner
34 views

1 answer to this question.

0 votes

Dear Learner,

Hope you are doing great.

Your code needs little bit correction. 

Please use the below given code :

package first;

import java.util.Scanner;

public class testfunctions {

 static int square(int x)

 {

  int y=x*x;

  return y;

 }

 public static void main(String[] args) {

  Scanner in =new Scanner(System.in);

  System.out.println("Enter the number : ");

  int n=in.nextInt();

  int result=testfunctions.square(n);

  System.out.println("Square of "+n+" is : "+ result);

 }

}

Please try the above code and let us know if you face any issue.

We will be waiting for your response.

answered Dec 18, 2017 by Sudhir
• 1,610 points

Related Questions In Data Analytics

0 votes
1 answer

Error saying "Error in rnorm() : argument "n" is missing, with no default" in R

Hey @ali, rnorm() function requires an argument, ...READ MORE

answered Oct 30, 2018 in Data Analytics by Maverick
• 10,040 points
197 views
0 votes
1 answer

"Error in eval(ei, envir) : object 'RDX2' not found" when trying to source the code in R

This is a very common issue that ...READ MORE

answered Oct 30, 2018 in Data Analytics by Maverick
• 10,040 points
528 views
0 votes
1 answer
0 votes
1 answer

Error in source("myfunction.R") : myfunction.R:2:3: unexpected symbol 1: 2: R version

Try formatting your code like this: myfunction <- ...READ MORE

answered Oct 30, 2018 in Data Analytics by Maverick
• 10,040 points
193 views
0 votes
1 answer

Looping error in R

You need a sequence to iterate over ...READ MORE

answered Oct 30, 2018 in Data Analytics by Maverick
• 10,040 points
21 views
0 votes
1 answer

"Error in if" while trying to execute simple code in R

This caused non-logical data or missing values passed ...READ MORE

answered Oct 31, 2018 in Data Analytics by Kalgi
• 40,420 points
36 views
0 votes
1 answer

Getting the following error: Error in eval

This error is caused by references to ...READ MORE

answered Oct 31, 2018 in Data Analytics by Kalgi
• 40,420 points
38 views
0 votes
1 answer

"no applicable method" Error in r programming

This is caused by using an object-oriented ...READ MORE

answered Oct 31, 2018 in Data Analytics by Kalgi
• 40,420 points
67 views
0 votes
1 answer

HIVE DATA LOADING ERROR

Dear Raghu, Hope you are doing great. It is ...READ MORE

answered Dec 17, 2017 in Data Analytics by Sudhir
• 1,610 points
201 views
+1 vote
1 answer

Need a hadoop engine in backend to run r server

Dear Koushik, Hope you are doing great. The hadoop ...READ MORE

answered Dec 17, 2017 in Data Analytics by Sudhir
• 1,610 points
53 views