Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,152,148 members, 7,815,020 topics. Date: Thursday, 02 May 2024 at 05:02 AM |
Nairaland Forum / Jas80's Profile / Jas80's Posts
(1) (2) (3) (4) (5) (6) (7) (8) (9) (10) (11) (of 11 pages)
Romance / Re: Make 4000 Naira Weekly by Jas80: 11:34am On May 23, 2020 |
Nelx: That is true sha. Anyways, it is just a website were u make money by reading and commenting on news online |
Romance / Re: Make 4000 Naira Weekly by Jas80: 7:29am On May 23, 2020 |
Haywhybaba007:ur number is not on WhatsApp |
Romance / Make 4000 Naira Weekly by Jas80: 12:49am On May 23, 2020 |
Good morning everyone, I just found a way you can be making 500 naira daily on the internet doing little task. Drop ur phone number if you are interested I will add you a WhatsApp group |
Romance / Re: Dating Drills! Guys Only! by Jas80: 2:47am On May 04, 2020 |
Donhezzy: Please don't continue, e don do 4 Likes |
Programming / Re: Java Tutorial: Beginner's Guild by Jas80: 4:33pm On Apr 23, 2020 |
[b]If else statement this statement has two options, one of the option is that our program should do this if the statement is correct, the other option is that our program should do something else, if the expression is not correct. public class Example { public static void main (String args []){ int result=30; if (result<50){ System.out.print("student failed"} else{ System.out.print("student passed" } } } Output: student failed Let's try something else. public class Example { public static void main (String args []){ int result=70; if (result<50){ System.out.print("student failed"} else{ System.out.print("student passed" } } } Output: student passed Hope you understood what happened |
Programming / Re: Java Tutorial: Beginner's Guild by Jas80: 4:24pm On Apr 23, 2020 |
Waiting for your answers. Another important concept in java is the if statement, if...else statement, if ....else if statement. if statement Basically, this statement is used to check whether an expression is correct or not. If the expression is correct it returns true but if the expression is wrong it returns false. It is used to execute a statement if the expression is true. For example. public class Example { public static void main (String args []){ int result=30; if (result<50){ System.out.println("this student failed the exam" } } } The output of the above program will be:this student failed the exam. Explanation From the above, the value of result is 30, and in our if statement, we asked if the value of result is less than 50, our program should display "this student failed the exam". 30 is lesser than 50, so this statement is correct, hence our expression will be executed. Understand? |
Programming / Re: Java Tutorial: Beginner's Guild by Jas80: 4:10pm On Apr 23, 2020 |
Another important operator in java is the modulus operator (%). As you can see, this operator is represented using the percentage symbol. This operator returns the remainder of a value after division. For example, 5%4, will return 1, because 4 will go into 5 once, and the reminoder will be 1. 10% 6; will return 4, because 6 can go into 10 only once and the remainder will be 4. So, that is that for the modulus operator. Exercise: public class Example { public static void main (String args []){ int a=5; int b=3; a%=b; System.out.println(a); } } Drop the answer below. |
Programming / Re: Java Tutorial: Beginner's Guild by Jas80: 4:04pm On Apr 23, 2020 |
Let's take a look at some other operators. public class Example { public static void main (String args []){ int a=20; int b=30; a+=b; System.out.println(a); } } The output of the above program will be:50. How? The += operator add the value of the right hand expression to the initial value of the left hand side expression. From the program, initially, a was 20, and b =30. But from our program, we used the += operator. So, the value of be is added to the value of a public class Example { public static void main (String args []){ int a=20; int b=30; a-=b; System.out.println(a); } } The value of a will be -10. public class Example { public static void main (String args []){ int a=20; int b=30; a*=b; System.out.println(a); } } The value of a will be 600. Hope you get the logic behind the programs above. Ask your questions 1 Like |
Programming / Re: Java Tutorial: Beginner's Guild by Jas80: 3:53pm On Apr 23, 2020 |
Good afternoon y'all Last time we talked about the "and" and "or" operator, there are several other types of operators in programming. Maybe we will talk about some today. Some words of wisdom before we start The beauty about learning a programming language is that, you can use the experience you get from it to work with other programming languages. For example, all programming languages uses stuffs like loops, statements, arrays e.t.c We all know all the advantages associated with being a programmer, so I advise you to never give up on the language even when you are finding it difficult to understand. All you have to do is, relax and come back at it with all you have got. Let's go |
Health / Re: Eko Telemed: Lagos Launches Online Medication Platform For The Sick by Jas80: 3:32pm On Apr 22, 2020 |
Nice one 1 Like |
Music/Radio / Re: Gwingz: "Overload" Ft. Lumsco (Video) by Jas80: 6:28pm On Apr 21, 2020 |
Was serious watching this video hoping to see overload, my brothers I no see any overload for here o |
Romance / Re: Her Mother Said She Can't Marry An Ebonyi Man by Jas80: 9:39pm On Apr 20, 2020 |
Oga giwoni, dis ur matter don reach front page o, I greet o |
Romance / Re: Her Mother Said She Can't Marry An Ebonyi Man by Jas80: 9:52pm On Apr 19, 2020 |
coronavirus19: This guy I know you |
Romance / Re: Her Mother Said She Can't Marry An Ebonyi Man by Jas80: 4:41pm On Apr 19, 2020 |
greatResearcher come and add this guy to your list 13 Likes |
Romance / Re: Good Day To You All Nairalanders by Jas80: 10:46pm On Apr 18, 2020 |
GreatResearcher: If you can't help, abeg try and mind your business na, wanna-be alpha 1 Like |
Romance / Re: Why You Not Getting Laid by Jas80: 5:42pm On Apr 14, 2020 |
Ladylite: What are you angry about beauty? Are you hungry?....... By the way give me an example of "better things" |
Romance / Why You Not Getting Laid by Jas80: 5:26pm On Apr 14, 2020 |
We are always attracted to people who will think are doing okay in life, everybody wants someone that can take them to the next level. Most of the times, the reason you don't get laid is because the girl thinks she can't get anything from you, she thinks you have nothing to offer. We have read several post here about people's girlfriends sleeping with guys they just met. All these things happen mainly because these girls see this new guy has someone who has everything going on for them. In Nigeria, when you are broke, you are regarded as lazy, when you are rich is the other way round. When your girlfriend meet a guy doing better than you in all aspect of life, she starts feeling you are not good enough for her. She might sleep with this guy, even without the guy asking her out. Guys who are doing well in life will often get laid regularly, unless of cause they act needy. Bro, rich guys don't toast girls. Na girl dy chase them. Bro if you don't work on yourself, that your dovy-dovy relationship will soon hit the rock. Everybody wants someone who will take them to the next level. Let's be sincere, looking at your life now, if you were a girl, would you want to bleep you? Talk true. A girl will only cheat on you because there is something she sees on the other guy that she is not seeing in you. It may be handsomeness, brain, built, talk, confidence, the list goes on. Your girlfriend can have a meet a guy today and get so attracted to you, to the extent that she will think about him even when she is with you. When a girl gets so attracted, just know that you might get laid within a week, don't get too carried a way, you will only get laid when you don't mess it up. Work on yourself and this will naturally happen. How do you work on yourself? 1. You read books 2. Work on your appearance. Is that your haircut really ok?, Are those clothes you are putting on up to date, do you smell nice, put ur appearance in order. Dress the way you want to be addressed. 3. Chase your passion don't chase girls. 4. Have plans on how to make money. I am not saying you should make money because of girls, make money because of yourself. You must have heard of Dubai, Paris, Ibiza, and other beautiful place, my guy, u no wan explore the world, na Nigerian abi Africa you wan die put?......abeg o Change your way of life and your life will change. I have used more than half of my time to write about how important it is to be a better person. Another reason why you might not get laid is because you are too needy, you must have gotten tired of hearing this, but it is the truth, even as a rich guy, if you are needy nobody will want to bleep you. Neediness is a total turnoff for everybody on this planet. Abeg, my guys I don tire, but all this bloggers dy try o 2 Likes |
Programming / Re: Java Tutorial: Beginner's Guild by Jas80: 8:35pm On Apr 12, 2020 |
So, try the above codes and get back to me. That's all for now. Ask your questions 1 Like |
Programming / Re: Java Tutorial: Beginner's Guild by Jas80: 8:34pm On Apr 12, 2020 |
The || operator (or operator). This operator returns true if both expressions or only one expression is true. It returns false only when both expressions are wrong. For example. public class Check { public static void main (String args[]){ int a =20; int b=15; System.out.println(a>5 || b<10); } } The output of the above code will be true. Because the first expression is true, a is 20, 20 is greater than 5, so this expression is correct. Our second expression is wrong because b is 15, and 15 is greater than 10. Note, this operator is also called the or operator. It returns true if one of the expression is true, and returns false when both expressions are false |
Programming / Re: Java Tutorial: Beginner's Guild by Jas80: 8:23pm On Apr 12, 2020 |
So, in our last post, we talked about arithmetic operators, and we also wrote a simple interest program, using the arithmetic operators. Today we are going to be be talking about logical operators. Logical operators are very useful operators you are going to need for your java programs. Below are some examples of logical operators. The & Operator: This operator checks two expression and returns true if both expressions are correct. For example, let's consider the program below. public class Check { public static void main (String args[]){ int a=20; int b= 30; System.out.println(a<b && b>20); } } The output of the above program will be true. Because our variables a and b has the value of 20 and 30 respectively. from our expression, a<b, is correct because a =20 and b= 30, 20 is less than 30, so our first expression is true. Our second expression says b>20, this is also true because 30 is greater than 20. Hence, the output : true. Note that, the && operator returns true only when both expression is true. Otherwise it returns false. That is to say that, it returns false when only one condition is true and returns false also when both expressions are false. |
Programming / Re: Java Tutorial: Beginner's Guild by Jas80: 8:09pm On Apr 12, 2020 |
Good evening everyone, it has been a while. I have been too busy. For those of you who are still interested I will be continuing from were we stopped |
Romance / Re: When A Girl You Like Says She's In A Relationship by Jas80: 6:23pm On Apr 08, 2020 |
I don't just understand guys on this romance section. Don't you guys learn from the mistakes others have made?. You must have heard times without number that you should never ask a girl out? And you still went ahead to ask her out, why? Because you think your case is different. Well done sir. My only advice is that you should forget about her. Try and work yourself, read books, watch movies and play video games, listen to musics. Stop chatting with her because that will only make make you stick around. Oga, abeg listen to the advice when I give you so o, if you like still go dy call her, na u know.....I don go 1 Like |
Programming / Re: Java Tutorial: Beginner's Guild by Jas80: 5:57pm On Apr 08, 2020 |
Hello guys, who is still interested in learning java, it has been a while 2 Likes |
European Football (EPL, UEFA, La Liga) / Re: Liverpool Vs Manchester United (2 - 0) On 19th January 2020 by Jas80: 9:49pm On Jan 19, 2020 |
Please I am looking for an apartment in ejigbo,canoe-ajao axis mushin, reply this message if you have any idea of who I can contact.,....abeg na better self contain o, |
Programming / Re: Java Tutorial: Beginner's Guild by Jas80: 9:46pm On Jan 19, 2020 |
Please I am looking for an apartment in ejigbo,canor-ajao axis mushin, reply this thread if you have any idea of who I can contact.,....abeg na better self contain o 1 Like |
Romance / Help by Jas80: 9:44pm On Jan 19, 2020 |
Am looking for an apartment in ejigbo,canor-ajao axis mushin, reply this thread if you have any idea of who I can contact.,....abeg na better self contain o |
Programming / Re: Java Tutorial: Beginner's Guild by Jas80: 4:07pm On Jan 18, 2020 |
[quote author=codedtony post=85901433][/quote] Ok |
Programming / Re: Java Tutorial: Beginner's Guild by Jas80: 3:56pm On Jan 18, 2020 |
codedtony: You don't need to bind it |
Programming / Re: Java Tutorial: Beginner's Guild by Jas80: 3:54pm On Jan 18, 2020 |
Note that, Java is case sensitive, meaning that, Jas is different from jas, e is different from E, so check your variables |
Programming / Re: Java Tutorial: Beginner's Guild by Jas80: 3:29pm On Jan 18, 2020 |
Pls note I am using my phone for the tutorial this afternoon, so pardon my typos, if any ( am telling u because of all this nairaland programmers). Explanation of the code: I told before that our variables must be assigned a data type. Our variables are p,r,t (which are the principal, rate and time respectively). And si(simple interest) which will hold our simple interest after calculation. Note that the data type given to prt is the int data type. Remember that 2, 10 and 11000 are whole numbers. But our si is double because simple interest usually ends up with decimal numbers after calculations. We don't know what our answer will be, so we have to use the double data type if at all the answer will be a decimal number. So, the data type u assign to a variable depends on the value of that variable. So if at all you know the answer for the simple interest above will be 2200, then you can assign the data type of "si" as int because 2200 is a whole number. NOTE: there is something known as data type compatibility, don't assign data types anyhow 1 Like |
Programming / Re: Java Tutorial: Beginner's Guild by Jas80: 3:05pm On Jan 18, 2020 |
Good afternoon, hope you all are fine?.....let's continue from were we stopped. Let's look into the data types in java. A simple interest program(formula is PRT/100) public Simple interest{ public static void main(String [] arts){ int t=2; Int r=10; int p=11000; double si=(p*r*t)/100; System.out.println("the simple interest is:" + si); } } Output: the simple interest is: 2200.0 1 Like |
(1) (2) (3) (4) (5) (6) (7) (8) (9) (10) (11) (of 11 pages)
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 78 |