prog.cpp:14:9: error: stray ‘@’ in program
@Override
^
prog.cpp:1:1: error: ‘import’ does not name a type
import java.util.*;
^~~~~~
prog.cpp:8:30: error: ‘Vector’ has not been declared
static void printLargest(Vector<String> arr){
^~~~~~
prog.cpp:8:36: error: expected ‘,’ or ‘...’ before ‘<’ token
static void printLargest(Vector<String> arr){
^
prog.cpp:37:12: error: expected ‘:’ before ‘static’
public static void main (String[] args) {
^~~~~~
prog.cpp:37:30: error: ‘String’ has not been declared
public static void main (String[] args) {
^~~~~~
prog.cpp:37:39: error: expected ‘,’ or ‘...’ before ‘args’
public static void main (String[] args) {
^~~~
prog.cpp:67:1: error: expected ‘;’ after class definition
}
^
prog.cpp: In static member function ‘static void GFG::printLargest(int)’:
prog.cpp:10:9: error: ‘Collections’ was not declared in this scope
Collections.sort(arr, new Comparator<String>(){
^~~~~~~~~~~
prog.cpp:10:26: error: ‘arr’ was not declared in this scope
Collections.sort(arr, new Comparator<String>(){
^~~
prog.cpp:10:35: error: ‘Comparator’ does not name a type
Collections.sort(arr, new Comparator<String>(){
^~~~~~~~~~
prog.cpp:10:46: error: ‘String’ was not declared in this scope
Collections.sort(arr, new Comparator<String>(){
^~~~~~
prog.cpp:10:54: error: expected primary-expression before ‘)’ token
Collections.sort(arr, new Comparator<String>(){
^
prog.cpp:29:5: error: ‘Iterator’ was not declared in this scope
Iterator it = arr.iterator();
^~~~~~~~
prog.cpp:31:11: error: ‘it’ was not declared in this scope
while(it.hasNext())
^~
prog.cpp:32:9: error: ‘System’ was not declared in this scope
System.out.print(it.next());
^~~~~~
prog.cpp: In static member function ‘static void GFG::main(int*)’:
prog.cpp:39:9: error: ‘Vector’ was not declared in this scope
Vector<String> arr;
^~~~~~
prog.cpp:39:16: error: ‘String’ was not declared in this scope
Vector<String> arr;
^~~~~~
prog.cpp:39:24: error: ‘arr’ was not declared in this scope
Vector<String> arr;
^~~
prog.cpp:40:19: error: ‘Vector’ does not name a type
arr = new Vector<>();
^~~~~~
prog.cpp:40:26: error: expected primary-expression before ‘>’ token
arr = new Vector<>();
^
prog.cpp:40:28: error: expected primary-expression before ‘)’ token
arr = new Vector<>();
^