]>
git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/testsuite/gdb.java/jprint.java
1 // jprint.java test program.
3 // Copyright 2004-2016 Free Software Foundation, Inc.
5 // Written by Jeff Johnston <jjohnstn@redhat.com>
6 // Contributed by Red Hat
8 // This file is part of GDB.
10 // This program is free software; you can redistribute it and/or modify
11 // it under the terms of the GNU General Public License as published by
12 // the Free Software Foundation; either version 3 of the License, or
13 // (at your option) any later version.
15 // This program is distributed in the hope that it will be useful,
16 // but WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 // GNU General Public License for more details.
20 // You should have received a copy of the GNU General Public License
21 // along with this program. If not, see <http://www.gnu.org/licenses/>.
23 import java
.util
.Properties
;
30 public static int addprint (int x
, int y
, int z
) {
32 System
.out
.println ("sum is " + sum
);
36 public int addk (int x
) {
38 System
.out
.println ("adding k gives " + sum
);
43 public class jprint
extends jvclass
{
44 public static Properties props
= new Properties ();
45 public static String hi
= "hi maude";
47 public int dothat (int x
) {
49 System
.out
.println ("new value is " + y
);
52 public static int print (int x
) {
53 System
.out
.println("x is " + x
);
56 public static int print (int x
, int y
) {
57 System
.out
.println("y is " + y
);
60 public static void main(String
[] args
) {
61 jprint x
= new jprint ();
64 print (x
.addk(0), 33);