Facebook
From Colorant Peafowl, 2 Years ago, written in Java.
">

A PHP Error was encountered

Severity: Notice

Message: Trying to access array offset on value of type bool

Filename: view/view.php

Line Number: 33

from

A PHP Error was encountered

Severity: Notice

Message: Trying to access array offset on value of type bool

Filename: view/view.php

Line Number: 33

- view diff
Embed
Download Paste or View Raw
Hits: 73
  1. import java.util.Scanner;
  2. public class suma_strings {
  3.  
  4.      
  5.     public static void main(String[] args){        
  6.         String nombre = nombre();
  7.         System.out.print(nombre);    
  8.    
  9.     }
  10.    public static String nombre(){
  11.        String nombre ;
  12.        Scanner scan = new Scanner(System.in);
  13.        nombre = scan.next();
  14.        String apellido = nombre2();
  15.        
  16.        return nombre+apellido;
  17.    }
  18.    public static String nombre2(){
  19.        String apellido;
  20.        Scanner scan = new Scanner(System.in);
  21.        apellido = scan.next();
  22.        return apellido;
  23.    }
  24. }