public static int f(String input) {
     public static Stack<Character> stack = new Stack<Character>();
        int n = 0;
        for (int i = 0; i < input.length(); i++) {
                if (input.charAt(i) == 'd')
                        stack.push('d');
                else if (input.charAt(i) == 'b') {
                        if (!stack.empty() && stack.pop() == 'd') n++;
                }
        }  
        return n;
}
i just want to know the significance of static keyword in object creation...just pasted the whole code here
 
     
     
     
    