0
How to avoid time limit exceeding because of this error I cannot execute my program.
In java
7 ответов
+ 1
your not calling your method ...
you have to add a main method, which calls your method.
+ 10
After seeing your code you dont have to creat main method.call your method inside a mean method like this
public class BitWiseOperatorsDemo
{
static void bitwiseWithBoolean()
{
boolean a= true,b= false,c;
c=a & b;
System.out.println(c);
c=a | b;
System.out.println(c);
c=a ^ b;
System.out.println(c);
}
public static void main(String args[])
{
bitwiseWithBoolean();
}
}
Note
Java programme start with main method if you create a method and if you dont call that method from main than that method cannot be executed.
+ 2
your program is probably not efficient enougth or you have an infinite loop inside of it...
post your code here, so we can actually help you 😅
0
Please tell me briefly
0
https://www.sololearn.com/learn/Java/2137/?ref=app
Every java program needs a main method.
0
Thank you everyone.