public static void enhancedForLoop(){ | |
int[] arr = {1, 2, 3, 4, 5, 6, 7, 8, 9}; | |
System.out.println("\nEXAMPLE: Enhanced For Statement"); | |
for (int temp: arr){ // Create a temporary variable, same type as array values. For | |
// loop assign array value to the temporary variable | |
System.out.println("Enhanced = " + temp); | |
} | |
} |
Category: Lessons
Java examples: Switch Statement
public static void witchStatment(int num) { | |
System.out.println("\nEXAMPLE: Switch Statement"); | |
switch(num){ //Check the value | |
case 0: | |
System.out.println("Case = " + num); // Execute this if 'case' matches the 'value' | |
break; // Stop the statement | |
case 1: | |
System.out.println("Case = " + num); // Execute this if 'case' matches the 'value' | |
break; // Stop the statement | |
case 2: | |
System.out.println("Case = " + num); // Execute this if 'case' matches the 'value' | |
break; // Stop the statement | |
case 3: | |
System.out.println("Case = " + num); // Execute this if 'case' matches the 'value' | |
break; // Stop the statement | |
case 4: | |
System.out.println("Case = " + num); // Execute this if 'case' matches the 'value' | |
break; // Stop the statement | |
default: | |
System.out.println("Default = " + num); | |
} | |
} |
Java examples: While Loop vs ‘do’-while loop
While Loop
public static void whileLoop(){ | |
System.out.println("\nEXAMPLE: While Loop"); | |
int num = 0; | |
while(num <= 20) { // Check the while condition first, Then execute the loop | |
// Then while 'l' is less than or equal to '0' | |
System.out.println("num = " + num); | |
num++; //increment 'l' by 1 | |
} | |
} | |
‘do’-while loop
public static void doWhileLoop() { | |
System.out.println("\nEXAMPLE: Do While Loop"); | |
int num = 0; | |
do { | |
// DO the work... Execute the loop first | |
System.out.println("num = " + num); | |
num++; //increment 'l' by 1 | |
} while(num <= 20); // Check the conditions | |
} |
Java examples: Fizz Buzz
for (int i = 0; i <= l; i++){ boolean f = i % 3 == 0, b = i % 5 == 0; String output = f ? b ? i + " FizzBuzz" : i + " Fizz" : b ? i + " Buzz" : i + "" ; System.out.println(output); }
Londoner to New Yorker
Today I’ve met my mentor Tony Bourne (CEO of BMA) and Julia John (Head of Marketing at Sweet & Maxwell) and I got told I’ve become from a Londoner to New Yorker.
I am reflecting back on the last year who I was and who I am now. Alot of things happened that made me who I am today. Rising Star program by The Key Club International with help from London Youth. I was quite lucky to be in after a mishap with my email address (Thanks Rosie Ferguson for fixing it!).
I was assigned Tony Bourne as my mentor and Julia John as my business friend. They gave their time and experiences to me. To put how busy they are in to perspective below is a picture of a desk with shit load of books. Tony’s desk is much bigger than with much bigger piles of organised chaos.(thanks Sarah Connolly for booking time for me with Tony)
With their help I did some amazing things things I won’t normally won’t do. When Tony referred to me and said I’ve been English and been conservative and polite that’s exactly what he meant. I here outline some of the things I did which made him refer to me as a new yorker.
- Market Research for Thomson Reuters (Healthcare and Science Division).
Julia introduced me to Emma-Warren-Jones (Senior Marketing manager) & Erik Jan Van Kleef (VP of sales EMEA). one of my tasks were to phone calls to Germany (I don’t speak German). I couldn’t back out I HAD to do it. So I did. To take my input seriously and action them AND at the end to been told I did great work for them and been recommended by them does a lot for your confidence.
- Going crazy in Berlin and sneaking in to the centre stage of Olympia Stadion and impersonate an official photographer.
Quite literally that’s what happened. Again confidence. I am yet to publish the full story.
- British American Project & Networking events
Their advice helped me to pluck up the courage to speak some of the most amazing people one can meet in their life. Kelly Kirschner, Jared Genser, Toby Wallace, Aaron D. Ford, Damon Porter, Linsey Willaford-West, Michael Logan, Rushanara Ali, Oli Barret, Lara Carmona, Jayson Clarke, Joanna Jepson, LucyWinskell, Martin Vander Weyer, Saher Sidhom. Google them if you want to know who they are. From outside they look average. Yet these people are some of the greatest people you will ever meet. Their advice insight down to earth personality regardless of their status, achievements are amazing. Great great advisors.
- Getting in to Masters
To put it bluntly I fucked my Undergrad quite badly I jumped in to water to save others when I couldn’t swim myself and I drowned and paid heavily. My Tutor Julisa Shelton during the time said to me
You can’t help other when don’t look after yourself
During the interview I messed up too and didn’t think I would get in. but I did! It was an achievement.
When people like those who named here tell me I can be better and worth more than I am. Regardless of my setbacks in life it does a lot for you. It’s all you need to do things and go after what you actually want. I’ve learnt to shed my fears that hold me back. Learnt to accept that failures are part of life
Edison was a new yorker who said that
I have not failed. I’ve just found 10,000 ways that won’t work.
I’ve realised that
We are not inadequate we are powerful beyond measure
and I’ve learnt to live by the below.
If someone tells you, you can do it, make them proud. If someone tells you that you can’t, prove they are wrong
So I am eternally grateful for Rising Star Program by Key Club and of course Nicola Hain, her team and people mentioned here for enabling this. I got long way to go before I be where I want to be in achieve my life goals and ambitions Yet this will give me the boost for a very long time.
I hope that one day opportunity arise for me to pay it back to them.