Parentclass class variables becoming null in child class java. #2633
adzbharadwaj
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I am using java for step implementation in parent and child classes but the child class gives null pointer exception.
Running in Intellij , gauge Version 1.6.9
Example:
class ParentSteps{
String str;
@BeforeSuite
public void beforesuite(){
str ="gauge";
}
}
class ChildSteps extends ParentSteps{
@step
public void step(){
System.out.println(str); //gives null pointer exception
}
}
Beta Was this translation helpful? Give feedback.
All reactions