New Posts  All Forums:Forum Nav:

String Java

post #1 of 3
Thread Starter 
given a string "hello" +. after the + operator, does the data after the operator has to be either a numeric value(int, float, long,...) or a string type? Can it be any class type or any datatype?
    
CPUGraphicsRAMHard Drive
Intel Core i7 4870HQ 2.5GHz AMD Radeon R9 M370X 2048 MB 16 GB 1600 MHz DDR3 1TB SSD 
OS
macOS Sierra 
  hide details  
Reply
    
CPUGraphicsRAMHard Drive
Intel Core i7 4870HQ 2.5GHz AMD Radeon R9 M370X 2048 MB 16 GB 1600 MHz DDR3 1TB SSD 
OS
macOS Sierra 
  hide details  
Reply
post #2 of 3
What? If you're declaring it as a string, then the whole thing is a string, no matter how you concatenate it.
Intellect v2
(9 items)
 
  
CPUMotherboardGraphicsRAM
Intel Core i7-6700K Processor ASUS ROG MAXIMUS VIII HERO LGA1151 DDR4 M.2 SAT... EVGA GTX 1080 SC ACX 3.0 Crucial Ballistix Sport 32GB DDR4 2400 MT/s (PC... 
CoolingKeyboardPowerCase
Noctua NH-D15 Das Keyboard 4 Professional (Brown) Corsair AX860 Fractal Design Define R5 
Mouse
MIONIX NAOS 7000 
  hide details  
Reply
Intellect v2
(9 items)
 
  
CPUMotherboardGraphicsRAM
Intel Core i7-6700K Processor ASUS ROG MAXIMUS VIII HERO LGA1151 DDR4 M.2 SAT... EVGA GTX 1080 SC ACX 3.0 Crucial Ballistix Sport 32GB DDR4 2400 MT/s (PC... 
CoolingKeyboardPowerCase
Noctua NH-D15 Das Keyboard 4 Professional (Brown) Corsair AX860 Fractal Design Define R5 
Mouse
MIONIX NAOS 7000 
  hide details  
Reply
post #3 of 3
Thread Starter 
yea, i know. "hello" + int type. int type will turn into a string. what i mean is can it be any data type after the + operator and it will turn into a string.
    
CPUGraphicsRAMHard Drive
Intel Core i7 4870HQ 2.5GHz AMD Radeon R9 M370X 2048 MB 16 GB 1600 MHz DDR3 1TB SSD 
OS
macOS Sierra 
  hide details  
Reply
    
CPUGraphicsRAMHard Drive
Intel Core i7 4870HQ 2.5GHz AMD Radeon R9 M370X 2048 MB 16 GB 1600 MHz DDR3 1TB SSD 
OS
macOS Sierra 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Coding and Programming