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
686 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,570 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,840 points
3,348 views
+1 vote
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,840 points
5,140 views
0 votes
1 answer

Error saying "Error in source("myfirst.R") : myfirst.R:14:2: unexpected '!' 13: 14: ë! ^"

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

answered Oct 30, 2018 in Data Analytics by Maverick
• 10,840 points
1,072 views
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,840 points
2,352 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,840 points
480 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
• 52,350 points
632 views
+1 vote
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
• 52,350 points
770 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
• 52,350 points
2,558 views
0 votes
1 answer

HIVE DATA LOADING ERROR

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

answered Dec 18, 2017 in Data Analytics by Sudhir
• 1,570 points
1,425 views
+2 votes
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 18, 2017 in Data Analytics by Sudhir
• 1,570 points
885 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP