Completely uninstall apache2
$sudo service apache2 stop
$ sudo apt-get purge apache2 apache2-utils apache2.2-bin apache2-common
$ sudo apt-get autoremove
$ whereis apache2
Completely uninstall apache2
$sudo service apache2 stop
$ sudo apt-get purge apache2 apache2-utils apache2.2-bin apache2-common
$ sudo apt-get autoremove
$ whereis apache2
can you run non static method on main
//You simply need to create an instance of the Object you created
public Class Obj{
public void nonStaticMethod(){
//execute code
}
public static void main(string args[]){
Obj obj = new Obj();
obj.nonStaticMethod
}
}
static vs non static java
// Static vs Object Called
// Static Methods don't require you to call a constructor
// Initialize statically
public class MyClass {
private static int myInt;
static {
myInt = 1;
}
public static int getInt() {
return myInt;
}
}
// Then call it
System.out.println(MyClass.getInt());
// VS Constructor
public class MyClass {
private int myInt;
public MyClass() {
myInt = 1;
}
public int getInt() {
return this.myInt;
}
}
// Then call it
MyClass myObj = new MyClass();
System.out.println(myObj.getInt());
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us