₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,330,489 members, 8,445,721 topics. Date: Wednesday, 15 July 2026 at 12:33 PM

Toggle theme

Seunthomas's Posts

Nairaland ForumSeunthomas's ProfileSeunthomas's Posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 (of 36 pages)

ProgrammingRe: Let's Be Honest Php Sucks When Building Enterprise Applications by seunthomas: 11:53pm On Oct 05, 2016
FrankLampard:
It is still possible Python is among the language used to build Google because that site builtwith.com can't really show info of site built with Python.

You can see that Google runs on pure PHP
PHP is not even in use google. From what i know, they use several languages like c/c++,java,python,golang. This are just a few i know of.

PHP is really used by big companies, even facebook does not use php, they use hack which is a superset of the php we know.
ProgrammingRe: The Greatest Programmer On Nairaland by seunthomas(op): 11:46pm On Oct 05, 2016
oluwasimtech:
Plz. am an O'level holder and also a graphic artist, what are my chances of getting admission into NDA
grin
google their site.
ProgrammingRe: Can An Array In Java Hold Multiple Types? by seunthomas(op): 11:42pm On Oct 05, 2016
Java is a language of languages.

It takes the lessons learnt from several languages.

Most times people don't understand the OOP in Java and they are confused because of its strong typing enforcing rule.
ProgrammingRe: What The Different Between ENUM And ARRAY In Java by seunthomas: 9:15pm On Oct 05, 2016
lekropasky:
class Test{



public static void main(String args[]){
boolean status=true;
char c='Y';
int v=100;
Object s[]=new Object[3];
s[0]=status;
s[1]=c;
s[2]=v;

System.out.println(s[0]);
System.out.println(s[1]);
System.out.println(s[2]);

}
}
this code will never run. YES. Because, boolean, char, int are primitive types not object, if you had written this....
Object[] s = new Object[3]
Integer number = new Integer(1);
s[0] = number; //this is correct, remember, class Integer extends Object and thats why you can store it instance inside an array of Object. Your code is rubbish, what you need to understand is that all Java classes implicitly extends an Object class which makes them an Object. You tried to assign a primitive type value to an object, its very funny, i am not even sure you know the different between 'String' and 'int'. i cant believe this is coming from somebody that tried to implement his own JVM its a SHAME. I didnt even tried this when i was a dummy in Java. Its so sad. Go and learn bro.
The code actually runs fine. If you tried it you would discover you are big f**l. Please try to run it and confirm your folly.
ProgrammingRe: Can An Array In Java Hold Multiple Types? by seunthomas(op): 9:12pm On Oct 05, 2016
lekropasky:
Seriously, this guy is dumb. You finally clear my doubt of you being a programmer, how can someone keep ranting over what he doesnt know for Gods sake. Shit!!!. Do you think nairaland is full of novice/dummy programmers? Even, a two weeks old Java programmer knows that storing different objects in an array is not possible.
class User {
private int userID;
}
class Admin {
private int adminID;
}
User[] users = new User[2];
users[0] = new Admin();

Any real Java programmer must be very sure that the code above is not possible to implement. And here is seunthomas ranting about shit, hes not even ashame of himself. I really mean this, Go And Learn....i can help you with that if you need it.
You dont know anything. Shaking my head for people like you. Dumb cannot define you.
ProgrammingRe: Can An Array In Java Hold Multiple Types? by seunthomas(op): 9:09pm On Oct 05, 2016
FincoApps:
I don't think an Array can hold different data types.... Seunthomas, I saw your code on the other thread where you created an Array of Objects.

Now it might seem like this Array is holding different types but since the Object class is the Parent of all other classes in Java, automatically all other classes are of type Object.

So technically you are putting the same type into the Array
They are actually not of type object rather the primitive types are upcasted to their prevalent java.lang type.

But in the real sense all data structures by design are flexible.

My first experience with this type of thing was in objective c and i later discovered truely in object oriented programming its possible to store almost anything in an array or list.
ProgrammingRe: Can An Array In Java Hold Multiple Types? by seunthomas(op): 9:06pm On Oct 05, 2016
larisoft:
To the best of my knowledge; the assertion that a java array can contain different types is false.

You could do this of course by making your objects extend one parent object, or implement a common interface, but then, they wouldnt be 'different types' anymore.

Also, to the best of my knowledge, arrays in java cannot be extended.
Then check this and explain if your assertion is true.
class Test{



public static void main(String args[]){
boolean status=true;
char c='Y';
int v=100;
Object s[]=new Object[3];
s[0]=status;
s[1]=c;
s[2]=v;

System.out.println(s[0].getClass().getName());
System.out.println(s[1].getClass().getName());
System.out.println(s[2].getClass().getName());

}

}


There is actually a class Array which is an extension of the primitive type [] and that can be extended.
ProgrammingCan An Array In Java Hold Multiple Types? by seunthomas(op): 5:40pm On Oct 05, 2016
Please we got into a small argument me and a NL user called @timtoday (@leprosy started making some noise also) about if this was possible.

I argued that since java was an object oriented language it was possible to create a new object which extends array and could handle that.

I am open to opinions, can this assertion be 100% true.
ProgrammingRe: What The Different Between ENUM And ARRAY In Java by seunthomas: 5:12pm On Oct 05, 2016
lekropasky:
Seriously, this guy doesnt know anything at all about Java, and i am not even sure you know any other language, and thats the reason why you are arguing that array can hold more than one datatype/object, a new Java programmer that is learning with mind wont even say this, talkless of your 100years experience with Java. Its a pity. I dont even know why you do this, maybe because you want to nailed down some potential clients from here. Its a pity once again.
Some people will just open their mouth to sha talk sha.

Please knowledgeable Java programmer, explain this code which is an array of objects and holds different types of object:

class Test{



public static void main(String args[]){
boolean status=true;
char c='Y';
int v=100;
Object s[]=new Object[3];
s[0]=status;
s[1]=c;
s[2]=v;

System.out.println(s[0]);
System.out.println(s[1]);
System.out.println(s[2]);

}
ProgrammingRe: The most popular programmer on Nairaland 2016 Edition by seunthomas: 7:25am On Oct 05, 2016
directonpc:
Nairaland is the biggest crap I have seen. The person delete my post that comply with the rules for personal reasons should continue.
Thats the challenge of a human curated system. Fairplay no dey na. angry
PhonesDevice Metrics: What Mobile Devices Do You Use? by seunthomas(op): 7:23am On Oct 05, 2016
This thread is to gather information about the devices that people still use, at the end of this thread, i will do an analysis and post it here or somewhere online.
I have a number of devices which i use for work,but personally i use a samsung S1 running android 2.2, i also have and an iphone 4s.

Please post your devices here.

Thanks.
ProgrammingRe: Lessons In How Not To Implement Application Security by seunthomas(op): 7:10am On Oct 05, 2016
Will continue with the thread later in the week. Need to handle some work related stuff.
ProgrammingRe: Help Revolved Error In Android Program by seunthomas: 7:09am On Oct 05, 2016
I checked your zipped code on google drive and am very curious how the code is working.

Can you upload the entire project.

From your code posted here, you are in order.

The issue may therefore be something else thats hidden in your project.
ProgrammingRe: What The Different Between ENUM And ARRAY In Java by seunthomas:
timtoday:
Documentation are made for humans. Please read it. It will help you to stop making yourself a laughing stock on this thread. I pointed you to one, not to stackoverflow, but your arrogance will not allow you to go check.

Am sure you didn't know what the method getClass() returns that is why you are saying as if you are raising a revelation.

Go educate yourself properly with the tools, you claim you know. And stop showing us that you have wasted 3 yrs of your life learning nothing! Than cut and paste!
See this man ohhh.

Were you dey when i dey work on my own personal implementation of the JVM in 2006??

Me i read the documentatations you are talking about, i also read language specifications as well as understand the concept behind stuff very well.


Anyway, like i said ignorance is a killer.

Mr only single types can be stored in a Java Array.
ProgrammingRe: What The Different Between ENUM And ARRAY In Java by seunthomas: 1:41am On Oct 04, 2016
timtoday:
You see, you really have low self-esteem. Age has got nothing to do with showing you that. Am actually 2 yrs old, here you are struggling with a 2yr old. It is not winning an argument. That is your area of specialization.

But you should have shown me HOW naw, clearly defining what both are. But as usual, you must change the point of discussion, since it is obvious you don't know what you are talking about.

For your information, an "object" "of a class" is an instance of that class. Am sure I have made mention of that again and again. Using the word "instance"
But in your mind, one who had shown you times and again that he knows what is talking about DOES NOT KNOW THE DIFFERENCE!

Obviously you live in your own reality! That is why you will claim "Everything in Java is an OBJECT!" Remember am 2 yrs Old. Please take your own advise and probably go sleep with it. Methuselah !
Ok ohh. Mr only single types can be stored in a Java Array.
Ignorance is a killer.
ProgrammingRe: What The Different Between ENUM And ARRAY In Java by seunthomas: 1:14am On Oct 04, 2016
timtoday:
I have told you, leave those your self praise singing to those it will catch.. Am not in that league!
If you have to pat your ego in a public forum, you problem have a low self-esteem.

I will help one more time maybe you can see clearly and more especially for those who may want to follow your wrong side of the books, which only God knows where they are from.


class Demo {

public static void main (String[] args) {

Object b = new Boolean(false); // why is this possible
System.out.println(b);
System.out.println(b.getClass());

boolean b2 = true;
// uncomments the following lines to get the errors
//System.out.println(b2); // what type is this?
//System.out.println(b2.getClass()); // can you do this?

// what about this?
Object b3 = b2;
System.out.println(b3); // what type is this now?
System.out.println(b3.getClass()); // can you do this now?
}
}


I don't need to tell you am right. My points and posts justify itself...

Just make sure you read the link on array I linked to in one of my post and stop telling yourself you know, then it is obvious you know NOTHING!
Good Morning!
Shaking my head right now.

You must be really young.

Cos you just want to win even when you are wrong.

I hope you wont go outside and do this.

By the way you are all wrong. Class and Objects are different.
ProgrammingRe: Nland programmers: i need your advise by seunthomas: 1:11am On Oct 04, 2016
okwyee:
Thank you sir, I have always admired the you on this forum..
I am just 17years old, though I first heard about programming when I was 12 but then my instructor didn't quite shed enough light on it as I didn't own a computer originally and also the basic things i had to know on a computer too...

First things first, I'm not after the money now, as I know and believe that will come on it's own when I have started solving problems, I've still got an extra 3 years to spend in the uni (I'm studying botany, which is not my dream course) and I hope that's enough time to learn and probably gather experience....

I've made alot of decisions on my own and it seems I have dedicated my future to programming, I know it will be difficult, but with the passion I have for it I know I'll triumph.. Thanks for your response, hope you reply soon smiley
Bro, the sky is the starting point for you. We actually share somethings in common. I for one also did not study CS in school. That means you need to work double hard because its much more difficult to break even in a line you did not study in school.

I have a friend who also like you read botany and is the CEO of a company that makes over 50k$ in revenue.

Who knows you could be the one that makes people like Mark Zuckerberg and Bill Gate look like they knew very little.

Like you have stated passion is key. I loved coding so much it affected my social skills.

I welcome you to a world of opportunities. Hope we can chat more anytime you are able.
ProgrammingRe: What The Different Between ENUM And ARRAY In Java by seunthomas: 12:54am On Oct 04, 2016
@timtoday I know am correct am just trying to rub it in well, so you can further show your folly.

Abi you think its beans to learn just one language for several years??
I pick up a new language in 3 days max but spent years learning Java because it was key to understanding OOP.
ProgrammingRe: What The Different Between ENUM And ARRAY In Java by seunthomas: 12:53am On Oct 04, 2016
timtoday:
You are the one that don't know yet you are shouting everywhere! I know you will jump the gun!

I just caught you using your own code! I just don't write codes, I understand what I write unlike you, who believe everything is an object in Java!

I have demonstrated to you every time you raise a point that I know what is happening under the hood! Not just talk, talk...

Please next time. Read well before you answer questions.

Arrays in Java holds a fixed number of values of a single type. It can't be more clearer. Every other object which extends an Object is an Object! It is still a single type! Can that be so difficult? And it is not a primitive datatype. Which is one of the thing makes everything in Java NOT to be an Object. The other is it has static types. Awosh!!!!
Maybe we dont understand each other, what are primitive types and what is an object also what is an array??
ProgrammingRe: What The Different Between ENUM And ARRAY In Java by seunthomas: 12:49am On Oct 04, 2016
Please ohh. Java guru's based on this code, can an array of objects hold any type or just a single type:


class Test{



public static void main(String args[]){
boolean status=true;
char c='Y';
int v=100;
Object s[]=new Object[3];
s[0]=status;
s[1]=c;
s[2]=v;

System.out.println(s[0]);
System.out.println(s[1]);
System.out.println(s[2]);

}
ProgrammingRe: What The Different Between ENUM And ARRAY In Java by seunthomas: 12:45am On Oct 04, 2016
timtoday:
I should admit am wrong? When you don't even know what you are saying? Holding primitives indeed!!!
Bro, you don't know these things! Just go and sleep!

Google can help you. Just ask is everything in Java an Object?!
You are actually contradicting yourself.


Forget what you see online. Not all answers you find on stackoverflow etc are accurate.
ProgrammingRe: What The Different Between ENUM And ARRAY In Java by seunthomas: 12:42am On Oct 04, 2016
timtoday:
Like I mentioned, you might know some other language NOT Java.
Because if you know Java and how JVM works, you will not that what you have in the are not "primitive" types.
It is has been converted to the Wrapper Class Type of the primitive type I mentioned you.

In fact, using a String should have prompted you to know that. Because String is not a PRIMITIVE TYPE, and She is immutable. At anytime you call String name = "My Name"; What you are doing REALLY is String name = new String("My Name"wink;.

You give you a taste of it using your own code do this:


public class Test{



public static void main(String args[]){
Object s[]=new Object[3];
s[0]=true;
s[1]="Hello World";
s[2]=20;

System.out.println(s[0].getClass()); //class java.lang.Boolean
System.out.println(s[1].getClass()); //class java.lang.String
System.out.println(s[2].getClass()); //class java.lang.Integer
System.out.println();

System.out.println(s[0]);
System.out.println(s[1]);
System.out.println(s[2]);


You see yourself?
JEEEZ.

I am tired of arguing with you.

Next time, try to know before arguing.
ProgrammingRe: What The Different Between ENUM And ARRAY In Java by seunthomas: 12:33am On Oct 04, 2016
timtoday:
Ahhhhaaa.. multiples of what types? Every Object defined in Java extends the "Mother" object called "Object".

Which means that every class is a sub-class of the super class Object.
And as far back as 10.19pm last night. I mentioned to you that
So what point are you making?

In fact, in that same post of 10.19pm I said this


Of what difference is what I said and what you are bringing up now? Some 2 hrs afterwards? Common!!
Seriously.....huh

Dude cant you just be honourable and agree you are wrong??

By the way my array is holding primitives

It is this kind of attitude that makes one rude and talk to people.

Just admit you are wrong and its gone.
ProgrammingRe: What The Different Between ENUM And ARRAY In Java by seunthomas: 12:16am On Oct 04, 2016
class Test{



public static void main(String args[]){
Object s[]=new Object[3];
s[0]=true;
s[1]="Hello World";
s[2]=20;

System.out.println(s[0]);
System.out.println(s[1]);
System.out.println(s[2]);

}


}


Check that out and lets continue that argument.

Thats an array that holds different primitive types.
ProgrammingRe: What The Different Between ENUM And ARRAY In Java by seunthomas: 12:11am On Oct 04, 2016
timtoday:
The high-lighted words of yours is WRONG!! And I have shown that even in my first post!



Go back and read what I posted as far back as 10.19pm. You have not said anything new! Stop playing on words.




Beautiful, you mentioned that you "THINK"! Well let me help you see properly so that you will get it that you are the one confused not me!
Check here https://docs.oracle.com/javase/tutorial/java/nutsandbolts/arrays.html
it will clear up your confusion.

The documentation first sentence shows who is confused here .. "..An array is a container object that holds a fixed number of values of a single type"

Read the rest yourself... You may know some other language, but java I doubt it! Maybe not as well as you think you do.
And an array of objects is what exactly?? Object s[]={}

Can this hold multiple types or not?
ProgrammingRe: What The Different Between ENUM And ARRAY In Java by seunthomas: 11:30pm On Oct 03, 2016
timtoday:
You don't get it, do you?
I really don't care the YEARS you used in learning the concept of OO. On the ARRAY stuff in Java, bros you miss am! Go back and check what I wrote, I know the OOP is not specific to a lang., However, i have been specific in this thread since what we are taking about is Java, a lang, that implement OOP.

Need more help? From whom? If with all the experience you often claim you don't know that ARRAY in Java are of single type. I think you need to come down from your high horse of self-importance, and take a second look at yourself and everything around you. You think more highly of yourself, than you really worth!

Contact you?! So that you will tell me that "everything in Java is an Object"? Over-the-bar!

As for both Bruce Eckel's Books, I have them. In fact, I can give you the third one, which is Thinking in C++, Volume 2. I bet you don't know there are two volumes to that book!

So, thanks. No thanks. I think I have to say good-nite... I better be watching a movie than having this discussion.
I have all the volumes of his book. So i dont need them.

Arrays can be of single type or can hold multiple types. Its simple, a derivative of a type is also a "type of that type", so a derivative of array is also a type of array.

If you dont believe this to be true, i can do a quick code to show you what i mean.

A derivative of array that can hold multiple objects.

I think your confusion is simple, you see array only as "[]" and not class called "Array" which is a derivative of [].
ProgrammingRe: What The Different Between ENUM And ARRAY In Java by seunthomas: 10:53pm On Oct 03, 2016
timtoday:
Whoever taught that need go check his or her book again! Am sure, you read my last post and why everything in Java is not an object! Except Ruby is now the NEW Java!

Every OOP language "implements" the OO ideals to varying degrees. If the assertion is true that all OOP lang has everything as Object, then the statement will be true that "In Cpp everything is an object"!!! I laugh in Bangladeshi!
The whole concept of OOP is that to fundamentally grasp it you have to see everything as an object.

I took a very long time to learn this concept.

I could recommend a book for you to go and read.

OOP is a programming pattern and not necessarily a language thing.

You can actually decide to write any language in OOP and you will still conform to that language syntax and semantics.

If you need more help understanding this may you can contact me directly.


But you can read Bruce Eckel's Book "Thinking in Java" or the C++ variant "Thinking in C++"
ProgrammingRe: What The Different Between ENUM And ARRAY In Java by seunthomas: 10:40pm On Oct 03, 2016
timtoday:
I don't need to do any research, I gave you examples of what am saying. Maybe you need to do more research as everything in Java is NOT an OBJECT. Java is not Ruby! Please don't get it confused.
Every primitive type has what is called a Wrapper Class Type which is an Object. Though these can take the primitive datatype but it does mean that the primitive datatype in Java is an Object.

More so, there is a class called Arrays, from java.util.Arrays. Used to make working with arrays of different datatypes a bit easier. That also doesn't make an ARRAY of a TYPE a datatype in itself. So what how research, do you think you will like to recommend?

In Java, an ARRAY of a type holds a single type! Plain and simple! Please don't complicate things.
The first thing you are ever taught in any java class is "In Java everything is an object". Are you saying this assertion is wrong. This also plays out in every object oriented language.
ProgrammingRe: What The Different Between ENUM And ARRAY In Java by seunthomas: 10:25pm On Oct 03, 2016
timtoday:
Am sure you know that array is not a TYPE in itself.
If you inherit from a class say Employee, with a subclass say HourlyEmployee. The best you can have stored in the ARRAY instant object of Employee is HourlyEmployee, you can't store into it a class TYPE of class say Student. And that is if you can even instantiate Employee to start with, that is if Employee is not an abstract class or an interface.

In the same vein, you can't store Strings in the ARRAY of TYPE Integers or Doubles... It doesn't work in JAVA that way, like I said in my previous post.

Storing different sub-classes of a super-class in the ARRAY of that super-class is not the same as storing different objects of DIFFERENT types like you have in Perl, JavaScript and the likes. Except you would like to show that all datatypes are the same as regards "vanilla" ARRAYs.

One of the reasons for other "containers" like we have it C lang., and her cousins like Cpp, Java and the likes.
In java everything is an object. There is the primitive type array and an object type Array built on it. So maybe you should do some more research.
ProgrammingRe: What The Different Between ENUM And ARRAY In Java by seunthomas: 9:54pm On Oct 03, 2016
timtoday:
I disagree in this sense ...
A "vanilla" array will store the same type in JAVA and a few of her cousins like C and C++.

E.g

final int SIZE = 10;
int[] numbers = new int[SIZE]; // you can't include Strings


Even if you write a class and make an array of it. Though the object of that class consist of various datatypes, you will still only be able to store the "type" of that class in it's array, even if you make a subclass of it.

E.g


class PersonDemo {
public static void main(String[] args) {
Person[] human = new Person[3];

human[0] = new Person("Name", 12);
human[1] = new Person("My Name", 15);

human[2] = new Person(false, null); // you can't do this
}
}

class Person {
private String name;
private int age;

Person(String name, int age) {
this.name = name;
this.age = age;
}
// set and do other stuff...
String getName() {
return this.name;
}
};

It is quite different to what one can do in languages like Perl, Python and some others.
Just saying...
The beauty of inheritance in object oriented programming is that you can actually create new types from one type.

Therefore you can have a class inheriting from type Array and it will able to store different objects.
ProgrammingRe: What The Different Between ENUM And ARRAY In Java by seunthomas: 7:21pm On Oct 03, 2016
HOJOSKID:
you guys are still not getting me right my definition of array is<<< array is a data type and also a container which can be use to store varables of same data types
so my question is is enum also container use for storing values cos i didnt really get what an enum is plz help a newbeeis oooo
Both are data types that hold a value.

However enum holds a predefined value while the value of arrays can be changed at runtime.
ProgrammingRe: Nairalanders Programmers Please I Need Your Help by seunthomas: 7:18pm On Oct 03, 2016
Just try to use 127.0.0.1 as against localhost as your host. Fingers crossed.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 (of 36 pages)