Why Static variable required in java?For ex,class A
{
static int a;
int b;
}
Why static is required?
Answer Posted / za
because it help us to declare class field asglobal variable
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
What do you understand by access specifiers in Java?
What is diamond operator in java?
Can you sort a string in java?
What is string array?
Can constructor be static or final?
Which sorting algorithm is best in java?
Is arraylist ordered?
What are the two ways in which thread can be created?
What is sleep method?
How do you reverse a string in java without using string buffer?
What is scope & storage allocation of global and extern variables? Explain with an example
For ease of programming you can consider the maze as a 2D array with colors represented by below integer and characters (in capital letters). • B - Black • W -White • G- Green • R- Red R B W B W W W W W W B W B B W W W W W W W B W B W W W B W W W W B B W W W B W W W B W W B B B B W B W B W W B W W W B W W W B B B W W B W W W B W W B W B W W W B W B W W W W B B W W W W B W W W W W G Shortest Route Problem: • Solution that finds the shortest Route between Red and Green White will have 1 Weight. Red and Green carry no weights. Shortest path is the path with less weight when you add up the weights in the path.
What is polymorphism java example?
What is callable java?
Can we execute a program without main?