Help coderanch get a
new server
by contributing to the fundraiser

Sthitaprajna Jena

Greenhorn
+ Follow
since May 31, 2013
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Sthitaprajna Jena

Sorry guys, my question was not clear. i fixed it by using random number generation. Thanks
10 years ago
I am new to Facebook graph API.I'm trying to figure out how to find how many of my friends and there basic information who has studied in the same school/university i have studies.

For example, i have studied in XYZ university , how can i look up who of my friends have studies in the same XYZ University.

Example : If i am calling this https://graph.facebook.com/me/friends?access_token=** then i am getting all my friends id,name and there info. So how can i modify this api call which will give me the result as i wanted.

This is my new requirement. Please help me.Thanks for your inputs.
10 years ago
I want the dynamic output for a particular condition.
and my condition is :

size =3;
countersize=8;// can be anything based on the user input.

if i got the the countersize as 4 or 5 or 8 for example then my output should be anyone of these 0 or 1 or 2 for a perticular countersize. and the output should be < 3.

**Example1:**

**user Input:** countersize=7 then output= 0 or 1 or 2 (only one from these)
**user Input:** countersize=5 then output= 0 or 1 or 2 (only one from these)
**user Input:** countersize=3 then output= 0 or 1 or 2 (only one from these)
**user Input:** countersize=0 then output=0
**user Input:** countersize=1 then output=1
**user Input:** countersize=2 then output=2
**user Input:** countersize=4 then output= 0 or 1 or 2 (only one from these)
**user Input:** countersize=9 then output= 0 or 1 or 2 (only one from these)
**Example2 :**
suppose size =2; and countersize=8;// can be anything based on the user input.

**user Input:** countersize=7 then output= 0 or 1 or 2 (only one from these)
**user Input:** countersize=5 then output= 0 or 1 or 2 (only one from these)
**user Input:** countersize=3 then output= 0 or 1 or 2 (only one from these)
**user Input:** countersize=0 then output=0
**user Input:** countersize=1 then output=1
**user Input:** countersize=2 then output=0 or 1 or 2 (only one from these)
**user Input:** countersize=4 then output= 0 or 1 or 2 (only one from these)
**user Input:** countersize=9 then output= 0 or 1 or 2 (only one from these)
similarly if i got the the countersize as 4 or 5 or 8 for example then my output should be anyone of these 0 or 1 for a perticular countersize. and the output should be < 2.
Please help me someone in javacode.
10 years ago
Thanks for the answer, So what i understood from your answer is the final access-modifiers restricting the class loading ?? if yes why ? I know if i am creating Mno object inside test it will work. But if i am not creating any object and removing the final then it works fine . So how does it work and why it is not working with final , that is my doubt.
11 years ago
Thanks ... But still can you elaborate more so that it will be good help for me also...
11 years ago
class Test{
public static void main(String arg[]){

System.out.println("**MAIN METHOD");
System.out.println(Mno.VAL);//SOP(9090);
System.out.println(Mno.VAL+100);//SOP(9190);
}
}

class Mno{
final static int VAL=9090;
static{
System.out.println("**STATIC BLOCK OF Mno\t:"+VAL);
}
}
As per my knowledge i know that static block executed when class loaded. But in this case the instance varibale inside class Mno is final, becuase of that the static block is not executing. Why so and if i am removing the final then it is working fine. which will be allocated memory first, staic final variable or static block. if because of final the class does not get loaded, then how can the variable get memory ??
11 years ago