New to Selenium, Getting error on creation of instance. Please help

14 views
Skip to first unread message

Techie

unread,
May 28, 2017, 6:39:22 AM5/28/17
to webdriver
Hi All,


I am new to selenium coding. 
Although 2 methods are declared below still on Ctrl + space getting msg as "No proposals". How to rectify this? (ss attached for reference)
I am trying to write the below code for polymorphism, however getting error when creating instance of object. Please help with this:


package Polymorphism;

public class Test
{
Test obj = new Test();
obj.add(40, 20);      //getting error on this line 
obj.                 // Although both the methods are declared below still on Ctrl + space getting msg as "No proposals"
 
public static void main(String[] args) 
{
}
public void add (int x, int y)
{
 x = 10;
 y = 12;
 int z=x + y;
System.out.println("the value of z: " + z);
 
}

 public void add (int x, int y, int a)
{
 x = 10;
 y = 12;
 a = 24;
 int z=x + y+ a;
System.out.println("the value of 3 numbers z is:" +z);
 
}
}

No proposals.docx

darrell grainger

unread,
May 29, 2017, 8:22:25 AM5/29/17
to webdriver
This has absolutely nothing to do with Selenium. The code you have presented is 100% Java. You might want to ask for help in a Java group or go to www.java.com and check out the tutorials on Java programming.

Darrell
Reply all
Reply to author
Forward
0 new messages