F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_31583914_3629.cpp:1:1: error: 'import' does not name a type
 import java.util.Scanner;
 ^
0_0_31583914_3629.cpp:4:13: error: expected ':' before 'int'
     private int x;
             ^
0_0_31583914_3629.cpp:5:13: error: expected ':' before 'int'
     private int y;
             ^
0_0_31583914_3629.cpp:7:12: error: expected ':' before 'Point'
     public Point(int x, int y) {
            ^
0_0_31583914_3629.cpp:12:12: error: expected ':' before 'int'
     public int getX() {
            ^
0_0_31583914_3629.cpp:16:12: error: expected ':' before 'int'
     public int getY() {
            ^
0_0_31583914_3629.cpp:20:1: error: expected ';' after class definition
 }
 ^
0_0_31583914_3629.cpp: In constructor 'Point::Point(int, int)':
0_0_31583914_3629.cpp:8:14: error: request for member 'x' in '(Point*)this', which is of pointer type 'Point*' (maybe you meant to use '->' ?)
         this.x = x;
              ^
0_0_31583914_3629.cpp:9:14: error: request for member 'y' in '(Point*)this', which is of pointer type 'Point*' (maybe you meant to use '->' ?)
         this.y = y;
              ^
0_0_31583914_3629.cpp: At global scope:
0_0_31583914_3629.cpp:22:1: error: expected unqualified-id before 'public'
 public class Main {
 ^


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2025 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.001000(s) query 1, Server time : 2025-02-18 17:14:46, Gzip enabled