Java ==== How do you find out what Java VM runs on your computer?

% java -version How do you compile and run programs written in Java? javac java nameofsource How do you run an applet in Java? appletviewer somehtmlfile.html How does the main function of a Java program look? public class SomeClass { public static int main(String[] args) { .... } } What is wrong in the following statements? javac nameofsource java nameofsource.class The compiler requires .java and the interpreter mustn't have the extension .clas s. How do you print a line in Java? System.out.println("some string here"); What are the 3 types of comments in Java? // single line /* */ multiline /** */ comments used by javadoc How do you declare variables? Just like in C++. What are the 8 primitive data types in Java? How many bits? byte(8), short(16), int(32), long(64), float(32), double(64), boolean(1), char(1 6) How do arrays work in Java? (2 types of initialization Just like in C++, but using [] instead of * int[] someintegerarray = {1,2,3,4,5,6,7,8,9,10}; someintegerarray= new int[10]; How do you copy arrays? use the arraycopymethod like this: arraycopy(Object src, int srcPos, Object dest, int destPos, int length) What class represents the character arrays? java.lang.String What operators are there in Java? Same as in C++. + also works for strings. >>> inserts 0 in the first position (> > insers a 1 or a 0 depending on the string)

this. How are methods created? Same as C#.. height). constructor). When used in a constructor. What does this mean? How do you use it in a constructor? This refers to the current object. For examp le: public class Rectangle { private int x. int height) { this(0.. How do you pass an arbitrary number of parameters to a method? You use the last argument ParamType. } public Rectangle(int x. Object references are passed by value. 0. height. y.How do you create a for-each loop in Java? for (sometype variable : somecollectionofsometype) { . 0). } How do you create a class? Same way as in C# (public. What is an overloaded method? A method with the same name as a previously declared method but with a different signature. Will those fields remain modified after the method re turns? Yes. params. } public Rectangle(int width. } . } . int width. How do you create a constructor for a class? Same as in C++. Using that reference will modify the object.x = x.. width. private or protected) What are the naming conventions in Java? Same as in Ruby for classes. and mo difies some of its fields. It has a length field. 0. 0. Classname obj = new Classname(params. The params is actually an array i n disguise. private int width. simply write: this(param1. this.. param2). of. this. int y.y = y. to invoke another constructor of the same class. Methods should have verbs as names.. the. How do you create an object? Just like in C++.height = height. =============================================================== Suppose you have an object and a method takes that object as a parameter.width = width. int height) { this. public Rectangle() { this(0..

W ithout a modifier it is available only within the package and within the class i tself. How do you create constant in Java? static final PI = 3. What is a final method? A method that cannot be overriden. 1) public static int myVar = 15. Class methods cannot access instance methods and instance variables without an object reference. } When do you use static initialization blocks? When you need to do some smart initalization that does error handling and/or fil ls arrays What is the advantage of initializing a static variable with a static private me thod? You can reuse that code.g.What are the modifiers in java? What differences are there from C++? public.. public static int returnSomeVar() { return 15. 2) static { // static initialization goes here inside the static block } 3) public static int myVar = returnSomeVar().141692683589 What are the naming conventions for constants? CAPITAL_LETTERS_SEPARATED_BY_UNDERSCORES Give 3 methods to initialize class variables.. What restrictions are there for class methods? Class methods cannot use this. blablabla.: public final int. I2 How do you declare a package private class? You do not use an explicit modifier? What are the acceptable modifiers for an outer class? public or package private . What switches do you need to use assert? java -ea MyProgram How do you say that class A is a subclass of class B? class A extends B How do you specify which interfaces does class A inherit? class A implements I1. E. Protected is also available within the package. private and protected. What is the equivalent of static initalization blocks for instance variables? Initializer blocks (they do not use the static keyword before them)... How do you add a private class variable of type integer called MyInteger? private static int MyInteger.

TUESDAY.. VENUS (4. JUPITER (1. 6. Why are java enums so special? They are actually classes. 2. this. 3.688e+26.lang. SATURN (5.. MARS (6. 6. // in kilograms private final double radius. etc. URANUS (8..Enum How do you iterate through the values of an enum? for (EnumType e : EnumType. What is a local inner class? A class within the body of a method..0518e6).4397e6).} How do you use enums? (definition and testing of values) SomeEnum myEnum. NEPTUNE (1.. other function go here } What are the 3 uses for an annotation? Information for the compiler. Runtime processing and Compiler/deployment-time pr ocessing How do you define an annotation? Similar to an interface.What are the acceptable modifiers for an inner class? public.869e+24. private. 2.37814e6).421e+23. if (enum==MONDAY) .3972e6). double radius) { this.} How do you use constructors in an enum? public enum Planet { MERCURY (3. protected or package-private How do you create an iterator? Create an inner class with methods like increment.0268e7). They are defined like in C# : public enum Days { MONDAY. isLast.976e+24.. How do you use an annotation without any elements? @annotation_name class/function follows here .values()) {.686e+25. 6. 2.303e+23. EARTH (5...5559e7).4746e7).1492e7).radius = radius. current.mass = mass. // in meters Planet(double mass.024e+26. inheriting from java.9e+27. What is an anonymous inner class? A class within the body of a method without a name. 7.. } . private final double mass. When should enums be used? How do you define enums? They should be used when needing a set of constants.

How do you write an annotation with some elements? @annotation_name ( element1 = value1. currentRevision = 6. Cindy // class code goes here } How would you redesign this using an annotation? Define the ClassPreamble annotation: @interface ClassPreamble { String author(). lastModified = "4/12/2004". Bill. int currentRevision() default 1. element2 = value2 ) class/function_follows_here What happens if an annotation has only one element named "value"? You can use it like this: @annotation_name(x) where x is the value of the elemen t named "value".. "Bob". String lastModifiedBy() default "N/A". "Cindy"} // Note array notation ) public class Generation3List extends Generation2List { // class code goes here } How do you make the information in Class preamble appear in the Javadoc generate d documentation? Use the @Documented annotation like this: @Documented @interface ClassPreamble { . @Override and @SuppressWarnings . // Note use of array } Use the annotation like this: @ClassPreamble ( author = "John Doe". Suppose you have this kind of class: public class Generation3List extends Generation2List { // // // // // // Author: John Doe Date: 3/17/2002 Current revision: 6 Last modified: 4/12/2004 By: Jane Doe Reviewers: Alice. String lastModified() default "N/A". date = "3/17/2002". String date().. String[] reviewers(). lastModifiedBy = "Jane Doe" reviewers = {"Alice". rest of code here Which are the three annotations provided by the language? @Deprecated.

. param2. It is not required to use it.. It is used like this: // Javadoc comment follows /** * @deprecated * explanation of why it was deprecated */ @Deprecated static void deprecatedMethod() { } What is the effect of the @OVerride annotation? It says that a certain function overrides a method in a superclass.. close this file. } } What happens? Can you explain why? The compiler generates an error complaining that File. The compiler issues a warning if this is not done correctly. .close doesn't override any method from its superclass. How do you call a method of the superclass? super.. What does @Suppress warnings do? How do you use it with multiple and single argu ments? It suppresses "unchecked" or "deprecation" warnings.some_method(param1. only it uses the word "interface" instead of "class".close . } class File implements Closable { @Override public void close() { //. It is used like this: @SuppressWarnings("deprecation") or @SuppressWarnings(("deprecation"...What is the effect of the @Deprecated annotation? How do you use it? The compiler issues a warning whenever a class/function marked as deprecated is used.paramn).... . How do you implement an interface? public class Bla implements ISomeInterface { } How do you cast an object into another object type? type1 object1 = (type1)some_other_type_of_object. paramn). it is implementing it! How do you define an interface? Like a class. . This is because it is not overriding Closable. Can interfaces be extended? Yes How do you call the constructor of the superclass of a class? super(param1. Compile this program: interface Closable { void close(). param2. "unchecked")) and then the method that issues warnings. b ut it is recommended.

Long. Integer. System. Write six subclasses of the class Number. Give 6 examples of methods inherited from the class Object. How do you get a short from an int? Using the method intValue(). How do you compare a Double with a Long? Using the method compareTo. public final Class getClass() public string toString() public int hashCode() protected Object clone() public bool equals(Object obj) protected void finalize() What do you have to do to use the clone() method? You have to implement the Cloneable interface. Give an example of a PrintStream object. 3) Access to functions related to numbers or strings. How do you write formatted output? Use the printf or format methods of a PrintStream object. If two object are equals. Byte. they must have the same hashcode. How do you convert to and from strings? toString and parseInt What is the difference between parseInt and decode? decode also accepts octal and hexa.What is the first thing that the constructor of a subclass should do? Call the constructor of the superclass. Which package contains the PrintStream class? . Short What are the 3 reasons for using a boxed type? 1) A method requires an Object. How do you check if a Float is equal to a Byte? Using the method equals. How do you declare a class or method which cannot be extended / overridden? Using the keyword final. 2) Access to constants. What is the relationship between hashCode() and equals(). How do you create an abstract class? Using the keyword abstract. Double. Float. How do you make parseInt work like decode? Using a second argument which gives the radix.out What does %n do? It is a newline appropriate to the platform.

min. How does the pattern # denotes a digit 0 denotes a digit or Decimals are rounded Any other characters string of DecimalFormat functions? a trailing zero up (except . How do you call sine. cosine and other mathematical functions in Java? You use the Math class. functions from the Character class.. Math. How do you find the position of a character in a string? Using the String.PI floor.format(123213131231).io What class do you use for greater flexibility in formatting of numbers? java. abs.concat() or the + operator. same as in Python.indexOf? The String. Give 2 examples of constants and 6 examples of basic functions from the Math cla ss.. max. How do you concatenate strings? Using String. How do you convert a String object (or part of it) to an array of characters? Using the method getChars(index_start. isDigit. . The methods of this class are all statical. toString How do you find the length of a string? Using the method length(). isLowerCase. How do you create a formatted string? Using the String.format method (very similar to sprintf). round Give 4 examples of exponential and logarithmic functions log.DecimalFormat What arguments does the constructor of DecimalFormat have? The pattern string... ceil.indexOf method. ) are added as-is in the output string How do you format a value with a DecimalFormat object ? String output = some_decimal_format_object.charAt method.E Math. buffer. index_stop. exp. functions from the Character class. isLetter. With two indexes. or . toLowerCase.random() Give 5 examples of is. pow. index_dest_begin). isUpperCase. sqrt How do you generate a random number? Using Math. isWhiteSpace. What are the two ways of getting a substring using the substring method? substring with one index returns a substring from that index till the end. What is the reverse of String.. Give 3 examples of to.

What class do you use? The java. You need something like a StringBuilder. What is the difference between substring method and subSequence method? The subSequence method returns a CharacterSequence. reverse. delete. How do you instantiate a generic? Box<Integer> integerBox = new Box<Integer>().valueOf method. insert.How can you split a String into substrings? Using the String. the data to be appended/inserted is first converted to a string. } What is a parametrized type? It's an invocation of a generic type. append.capacity. beginsWith endsWith equals. You have a program using threads. int maximum_size_of_array]) method. With insert and append. How do you find the length and capacity of a StringBuilder object? Can the capac ity be modified? Using the methods StringBuilder. deleteCharAt. setCharAt. What is the capacity of a StringBuilder created with the StringBuilder() constru ctor? 16 elements. replace. Give 6 methods for comparing strings.trim() method do? Returns a String without leading and trailing white spaces.. What are some naming conventions for the type parameter? .lang. What do you use? java. The capacity modifies according to the needs.lang.length and StringBuilder. Give 7 methods that modify a StreamBuilder's content.StringBuffer -> same thing with synchronized methods..split(String regexp[. What does the String. equalsIgnoreCase compareTo. How do you convert from a number to a String? Using the String.StringBuilder class. How do you change the length or the capacity? Using the setLength and ensureCapacity methods. compareToIgnoreCase matches regionMatches You would like something like a String object but modifiable. What is the equivalent of templates in Java? Generics How do you define a generic in Java? public class SomeGenericClass <T> { .

annotation types How do you add a class to a package? You add at the top of the source file: package package_name.color. .Rectangle? import graphics. How many classes are allowed in a source file? As many as you want but only ONE public class. Suppose you have class Rectangle in package graphics.. enumerations. You cannot add animals to such a cage. How many package declarations are allowed in a source file? Only one. How do you import the public nested classes of graphics. What are types? classes. You need to import java.awt. Write a superclass of both Cage<Butterfly> and Cage<Lion> if Lion and Butterfly are of type Animal.type N .*. What does static import mean? You only import the static members of a package like this: import static somepackage. V . How do you include that me mber? import graphics... What good is the Cage<? extends Animal> type? You can write methods that iterate over a cage of some type of animal (Lion or B utterfly) and do stuff there.Rectangle.E .value S.key T . 3rd. U. 4th parameter How do you define a generic method? Something like public static <U> void doSmth (U u) { . How do you say that a certain generic method should only accept Number and Strin g types? public <U extends Number & String> void doBlaBla (param1.number V .*.) If Lion is subclass of Animal. Cage<? extends Animal> . Can you refer to java. What does Cage<? extends Animal> and Cage<? super Animal> mean? It means a type holding some type of animal or holding some type of object that is a superclass of Animal. What is the 'Catch or specify requirement' ? Code throwing exceptions must be enclosed in a try code that deals with the exce .Rectangle. does it mean that Box<Lion> inherits Box<Animal> ? No. param2..awt.* .element K .col or as just color? No. Suppose you have the statement import java. interfaces.awt.* .2nd.

Give example of 3 methods of StackTraceElement class. What is the naming convention for exceptions? They should end in Exception.. .Throwable? Error and Exception. Exception has the RuntimeException subclass. hasNextDouble. print.ption OR a method that specifies that it can throw an exception. What are the three exception types? Checked exceptions (something like user errors). What are the equivalents of stdin.out. println What are the important functions for the Scanner class? hasNext.err How can you use the console in Java without using the standard streams? Using the Console class. What are the most important subclasses of java.. next. How are 8 rules of naming for classes Buffered.lang.logging package. getLineNumber getFileName getMethodName Give example of a method of an Exception object. How do you use a log in Java? Use the java.util. What are the 4 keywords relating to exceptions? try catch finally throw What objects can be used as arguments for the throw statement? Only those inherited from java.Throwable. getStackTrace() . -> buffered stream InputStream -> Input byte stream OutputStream -> Output byte stream Reader -> Input character stream Writer -> Output character stream PrintStream -> Formatted output using PrintWriter -> Formatted output using unctions) Scanner -> Scanner (for scanf type of Object. What are the important functions for the PrintStream and PrintWriter classes? format. -> An object stream regarding streams in the java... stdout and stderr in Java? System. errors and runtime exceptions. What argument does the Scanner constructor have? A buffered stream for reading characters from a file. nextDouble.. The last two are called unchecked errors and derive from the Error and RuntimeEx ception package? bytes characters (these are for printf type of f functions) What argument does the PrintWriter constructor have? A stream for writing characters in a file. returns an array of StackTraceElement.lang. System. System.

). What is the difference between the absolute path and canonical path? The absolute path might be C:\Java\. What does the File.util. What are the most common data stream classes? What can you do with a File object? Create it.listRoots.\Java\SDK\stuff.RandomAccessFile.. Give example of 3 methods of the Console object. the last date when it was modified. get its absol ute path. find out if it is writable or format(. What class is used for writing/reading objects? java. . On Unix. What are the interfaces implemented by ObjectInputStream and ObjectOutputStream and what are their superclasses? ObjectInput and ObjectOutput and the superclasses are DataInput and DataOutput. getFilePointer Name three packages from and java.DataInputStream and java. What does the java. skipBytes..File class represent? A file path and name. if it is a file or directory . get its path.How do you get the console using the Console class? System.console().txt (i. How do you seek through a file? Using the java.e. not a file. the simplest path possible). readPassword("Password :"). if it is hidden. How do you write portab le programs? Using What are data streams used for? Writing and reading Java data types to What interfaces do data streams implement? The DataInput or the DataOutput interface.getParent() method do? Find out the parent of a file if a longer path (like "C:\Java\SDK\stuff. find out if it exists. the file separator is / and on Windows it is \. What are the most important methods of RandomAccessFile (3) ? seek.txt") is given. What methods are used for reading/writing objects? readObject and writeObject of the appropriate stream objects. if it is readable.txt while the canonical pat h is simply C:\Java\SDK\stuff. etc. How do you find out the drives of a system? Using the File. What is the role of the Serializable interface? Classes that implement this interface can be written to a file. readLine("Prompt :").

appendReplacement . end matches .14.:myClass) that implements the Runnable interface. 2) Create a class (e.Substitute the regexp with somethi ng else What is the difference between lookingAt and matches? matches checks if the entire string is matching the regex. Create a new object of the myClass type and call its start method. replaceAll. Define the method run.logging. How do you return a different return code to the OS (other than 0 = success) ? Using System. Call its run() method. java. Pattern.exit method. Pattern. How do you pause execution? Using Thread.concurrent. replaceFirst. java.Check if the pattern matches the string.matches static method checks quickly if the regex matches the second par am. How do you obtain a matcher object? You call the as argument. What does Thread. How do you do scanf in Java? Create a new Scanner object using the object System.g.join() do? Waits until the specified thread finishes execution. lookingAt.util. How do you interrupt a thread? Using myThread. Matcher and PatternSyntaxException.Finding the index of the characters matched find. How do you make a constant in Java? final double myPI = 3.util. What classes are available for working with big numbers? BigInteger and BigDecimal.toString method returns the string representation of the method. How do you create a thread? 1) Subclass java. Redefine the method run.regex package? Pattern.interrupt() (where myThread is of type Thread). What is the Matcher object used for? start.regex What are the important classes in the java.matcher method with the argument the string to be matched. Create a new object of type Thread with the a new object of type myClass. What important methods are in the Pattern class? Pattern.util.compile static method returns a pattern object containing the regex.split method splits the string given as argument using the compiled rege x (of the object) as separator Pattern.Thread (e.g.: myClass). lookingAt checks if the beginning of the regex is matching it. What return type has the main function in Java? void. . What control structure exists in Java but is unavailable in C++? Labelled break (equivalent with a goto from within a loop).

. What interfaces are used for running tasks? Executor.statements } How do you wake a thread that called wait()? Using the notify or notifyAll method. What is the difference between ExecutorService and Executor interfaces? ExecutorServices has the submit() method which can call a Callable object AND a Runnable object How does a thread detect that an interrupt has ocurred? It either catches the interrupt exception. What happens when a method is synchronized? Synchronized methods of an object cannot be accessed simultaneously. What is the difference between a Runnable and a Callable object? A Callable object returns a value. .. How do you use mutexes in Java? java.util. divide or multiply big numbers? Using the methods BigInteger. defaultProps.. in. Reen trantLock is-a Lock.load(in). if the function is able to throw it O R it checks for interrupts with Thread. What is the equivalent of Thread(someRunnableObject). How do you know if a Thread is still running? With the method isAlive().interrupted static method.locks. etc.execute(someRunnableObject). Essentially .multiply.. The submit function returns a Future object w hich can be used to retrieve the value returned by the Callable object. substract. Example: // create and load default properties Properties defaultProps = new Properties(). What class is used for managing properties? java. // create application properties with default Properties applicationProps = new Properties(defaultProps). How do you use synchronized statements? synchronize (some_object) { .Lock ..concurrent.util. FileInputStream in = new FileInputStream("defaultProperties"). the file stream can be closed afterwards.start() on a executor? Executor.. or their BigDecim al equivalents.tryLock() method. What functions does ScheduledExecutorService interface support? submit() which specifies also the date at which a Runnable/Callable object shoul d be run.add and BigInteger.load(someFileStream).close().How do you add. it is as if the object had a mutex and before calling any synchronized method there is an acquire operation and a release after leaving it. use the ReentrantLock.Properties What method do you use to load properties? Properties. ExecutorService and ScheduledExecutorService.

user. String>.load(in). eleme nts. How do you save properties? Using the Properties.home. getProperty(with default value). user. How do you set properties? setProperty. What methods does an iterator provide (3)? user.vendor. . size.class. .version. What are some methods of collection (10)? add.getenv() What is the equivalent of STL in Java? Java Collections Framework What is the basic interface hierarchy for Java Collections Framework? Collection .// now load properties from last invocation in = new FileInputStream("appProperties"). addAll.separator.SortedMap How do you create an immutable set with only one element? Collections.SortedSet . contains. isEmpty. java. containsKey. remove. java. line.List .dir. .Set -. What functions do you use to get a property? contains. os. retainAll.load method. out.home.Queue Map . . getProperty. System. containsAll. removeAll.separator.setProperty Name some system properties. toArr ay. No duplicates allowed.getProperty. applicationProps.versi on. This returns a Map<String.path java. path.singleton(someElement). Example: FileOutputStream out = new FileOutputStream("appProperties"). os. clear. remove ( key) How do you get access to environment variables? Use the System. os. file. list.separator java. How do you get access to system properties? How do you set them? System. next and remove. "---No Comment---"). What methods does contain Set over Collection? None new.close(). applicationProps. keys. etc.close().name. in.

subList How do you get a list from an array? Using the static method Array. check if they exist. What are unmodifiable wrappers? They ensure that the collection cannot be modified. lastKey. get. size. special purpose. abstract What are the implementations of the Set interface? HashedSet. values. . indexOf. lastIndexOf. TreeSet. TreeMap and LinkedHashMap. peek What are the basic operations of Map? put.asList() which returns a List. How do you sort a collection in an order other than their natural order? With a Comparator object (implements the comparator interface). first. What can you do with a list iterator? Go to next and previous elements. tailSet. convenience. comparator. CopyOnWriteArraySet What are the List interface implementations? ArrayList. clear. What are the interfaces of the Queue interface? LinkedList and Priority Queue What are the synchronization wrappers? They are static functions of the Collection types which return synchronized vers ions. putAll What collections are there in a Map? keySet. What kinds of implementations are there in the Java Collections Framework? general purpose. isEmpty. What are the operations of SortedMap? subMap. What are the operations of SortedSet? subSet. element return value: offer. set. add. firstKey. comparator. containsKey. headSet. last.What new methods are in List interface? get. LinkedHashSet What special implementation of the Set interface are there? EnumSet. tailMap. entrySet How are strings sorted alphabetically and dates chronologically using the same f unction (Collections. poll. remove. concurrent. What are the important methods in the Queue interface? throw exception: add. LinkedList What are the List interface specifications? CopyOnWriteArrayList What are the Map implementations? HashMap. headMap. containsValue. remove or set them. wrapper.sort)? They both implement the Comparable interface (it has the compareTo method).

JSplitPane. Collections. JList. JTextPan e. Collection s. What controls do you use for highly formatted information? (8 Classes) JTextPane. Collections. JFrame(this one is a window actually. fill. JCheckBox. addAll What are some basic controls in Swing? (10 Java classes) JButton. What collections can be shuffled? How do you shuffle a collection? Lists can be shuffled. JFileChooser. .min and Collections. JTree. JRootPane How do you run an applet from a JAr file? <applet code=ClassName. JTextArea.singleton. Collections. JRad ioButton. Collections. JComboBox. JDialog.list). JSlider.binarySearch(list. just like in Emacs). JPasswordField. JSeparator.disjoint How do you find the minimum and maximum values in a collection? Collections.nCopies How do you sort a collection? Collections.jar" width=width height=height .. JToolTip What are the 3 top level containers in Java? JApplet. key) (also variant with Comparator argument speci fied). etc. JSpinner.sort(someCollection).class archive="JarFileName. JScrollPane. someRandomObject). How do you find out how often an element is within a collection? Collections.emptySet (map. What are some uneditable information displays? (4 Classes) JProgressBar. JLabel.sort(someCollection. JColorChooser. JEditorPane. JTable. someComparatorObject). JTable.frequency How do you find out if two collections have no element in common? Collections.asList.What are some convenience implementations of the Java Collections Framework inte rfaces? Array. JToolbar.shuffle(someList). JTabbedPane How do you do MDI in Java? JInternalFrame What is a layered pane? A JLayeredPane is a panel which provides depth for the objects. What are the general purpose containers in Java? (5) JPanel. swap. What algorithm is used for searching? Collections. JTextField. Collections. copy.shuffle(someList. or applet. What is a root pane? The main pane in a mdi application.max What routine data manipulation algorithms are in the Java Collections Framework (5 methods)? reverse. JMenu.

.MF What is the content of the default manifest? Manifest-Version: 1.0 Created-By: 1. uf) filename How do you get verbose input from jar? With the v parameter.0 (Sun Microsystems Inc. OR Use the e parameter How do you change directories in a Jar file? The C parameter What is the pathname of the manifest? META-INF/MANIFEST.jar What are the formats for extracting. viewing.) How do you modify the main class of a manifest? Main-Class: classname How do you add classes to a JAR file? With the Class-Path: line in a manifest file then use the -m switch. How do you specify no compression on the jar file? With the 0 parameter How do you specify the main class in a jar file? Create a manifest with the Main-Class specified and use the m parameter.</applet> How do you run a jar archive? java -jar JarFileName.6. creating and updating jar files? jar -xf (or tf. What does it mean to seal a package? It means that all the classes of the package can only be accessed within that Ja r file.util Implementation-Version: build57 Implementation-Vendor: Sun Microsystems. Implementation-Title: java. Inc. Inc. Sealed: True What are some version informations that can be added to a Jar file? Name: java/util/ // Name of the package Specification-Title: Java Utility Classes Specification-Version: 1. cf.2 Specification-Vendor: Sun Microsystems.. How do you seal a package? Name: .

Sign up to vote on this title
UsefulNot useful

Master Your Semester with Scribd & The New York Times

Special offer for students: Only $4.99/month.

Master Your Semester with a Special Offer from Scribd & The New York Times

Cancel anytime.