Respuesta :

Code segments are codes taken out from a more complete code or program

The result of executing the code segment would print 14

How to determine the result

To determine the result, we simply run the program as follows:

public class SomeClass{

private int x = 0;

private static int y = 0;

public SomeClass (int pX){

x = pX;y++;

}

public void incrementY (){

y++;

}

public void incrementY (int inc){

y+= inc;

}

public int getY(){

return y;

}

public static void main (String [] args){

SomeClass first = new SomeClass (10);

SomeClass second = new SomeClass (20);

SomeClass third = new SomeClass (30);

first.incrementY();

second.incrementY(10);

System.out.println(third.getY());

}

}

The result of running the above program is 14

Hence, the result of executing the code segment would print 14

Read more about code segments at:

https://brainly.com/question/25781514

ACCESS MORE