All Topics
Topic26 questions
Accenture 03 Class And Objects, Date ApiQuestions & Answers
Practice 26 verified Accenture 03 Class And Objects, Date Api questions with detailed answers and explanations. Tap any question below to study the full solution — perfect for last-minute Accenture primer and dumps prep.
03 Class And Objects, Date Api question list
The methods of a class with the ____________ access specifier cannot be accessed in its subclass class of different package.Predict the output. class X { void display(int a) { System.out.println("INT"); } void display(double d) { System.out.println("DOUB…Observe the code public class Sample { public static void main(String [] args) { int x = 6; Sample p = new Sample(); p.display(x);…Integer x1 = new Integer(120); int x2 = 120; System.out.println( x1 == x2 ); What will be the output of the above code fragment?Given: public class Message { String msg; int noOfWords; public Message() { msg += " Thank you"; } public Message(int noOfWords) {…Given classes defined in two different files: 1. package p1; 2. public class Test { 3. public static void display(String [] a) { /…What is the outcome of the code? public class Item { private String description; public String getDescription() { return descripti…Which of the following is not a Java modifier?switch(a) { default: System.out.println("Welcome"); } Of which data types can the variable a be? 1. long 2. byte 3. int 4. char 5.…Predict the output. public class Test { public static void main(String args[]) { int a = 2, b = 0; for ( ; b < 20; ++b) { if (b % …What will be the output of the following code? int i=20; if(i>10) { System.out.println( "The value of i is "+i); i++; if(i%2!=0) b…State True or False When using eclipse whichever classes are needed for the present class can be imported automatically.Eclipse IDE, if we provide a workspace, it should already exist. If not, it will not open.___ and _____ are the access specifiers that can be applied to top level Class.class Sample{ private double num = 100; private int square(int a){ return a*a; } } public class Test{ public static void main(Stri…Choose the appropriate access specifier for the attribute value so that it can be accessed from anywhere. class Test { public int …Consider the below code snippet and determine the output. class Student { private int studentId; private float average; } class Te…The below code snippet shows an error cannot find symbol: System.out.println("BookId:"+bobj.getId()); public class Book { private …Observe the below code. public class Student { private int id; private String name; private char grade; //Constructor 1 public Stu…Observe the code below. public class Student { int studentId; String name; char grade; public Student(int studentId, String name, …Observe the below class. class Product{ int productId; String productName; Product { productId=0; productName= ; } Product(int id,…Given the class Book and Library in two different packages : 1. package model; 2. public class Book { 3. private static void count…Given the class Book in packages p1 and class Main in package p2. In main to create an object of Book, which of the following are …Assume class Calculator in package p1 and CalculatorService class in package p2 as shown below. package p1; public class Calculato…Choose the correct order of the Java code fragments: 1) public class Main, 2) import java.util.Scanner;, 3) {, 4) // Some code her…For the below code, what are the valid ways to invoke display method in the main method. public class Test { public static void di…Practice more Accenture topics
PrimerDumps has 1400+ primer questions, 2026 mocks and coding hands-on — all free.