• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

STRING

 
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guyz ,
my question is ,
Y string is not primitive data type and y it is object reference ?
plz give some solid logical REason
Thanx in advance
Regards
Khurram Fakhar
 
Desperado
Posts: 3226
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
By "y" you mean "why", right?
Almost anywhere in the world a programmer (like other professionals) needs to show the ability to communicate clearly.
Don't take this the wrong way. But we have noticed recently some posts by various people (that is, not by just one person) that have taken the liberty of "extending" the English language as they see fit. This can only result in some people ignoring the questions altogether.
I know English is NOT the first language of everyone here (mine is Spanish!) but let's keep in mind that written communication (usually in English) is commonly required in professional programming positions, even outside of the English speaking world.
These are my personal views which do not necessarily reflect the views of the owner of this site.
 
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've gotta put my pet peeve in here too! Please forgive this...
A person buys a voucher for and TAKES the exam. Many, many times I have seen where people say they are going to give the exam today. English is NOT a common sense language, and this verb usage proves it! Even though you are going to a place to give them your answers, you actually go to take the exam. I just wanted to point this out to those of you just learning the English language.

 
Wanderer
Posts: 18671
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To answer the question: if a string were some sort of primitive, then it wouldn't have all those useful methods like indexOf(), startsWith(), substring(), and many others. And it would have to be given a fixed length, which would be both wasteful (forcing very short strings to take up more memory) and limiting (what do you do if you want a string longer than the standard length?). There are so many things we need to be able to do with strings, I can't imagine how a primitive could achieve them all.
 
That which doesn't kill us makes us stronger. I think a piece of pie wouldn't kill me. Tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic