3rd semester Solution || 1st term || 2019

1st Semester

Surkhet

Web

1.Define html.
ans. Hypertext Markup Language (HTML) is the standard markup language for documents designed to be displayed in a web browser. It can be assisted by technologies such as Cascading Style Sheets (CSS) and scripting languages such as JavaScripit.
2.what is the uses of <strong> element?
The <strong> tag can be used to convey importance in a heading, caption, or paragraph when a certain part needs to be distinguished as the part that really matters from other parts.

  1. Why <body> tag is used in HTML?

ans. The <body> tag is used in HTML because the HTML <body> tag defines the main content of the HTML document or the section of the HTML document that will be directly visible on your web page.

  1. Mention the uses of CSS in HTM?
  • solve the big problem
  • save a lot of time
  • c.provide more attribute
  1. write the syntax to create radio button in HTML.

<input type=”radio”>
 

Java

1.why was java developed although there were a number of language already existing?
ans: java was developed although there were a number of language already exist because to make an easy to code cross platform language so that you can write an application and run it anywhere that has a valid java virtual machine.
2.What is operator? list bitwise operator.
An operator, in Java, is a special symbols performing specific operations on one, two or three operands and then returning a result. The operators are classified and listed according to precedence order. Java operators are generally used to manipulate primitive data types. The Java operators are classified into eight different categories: assignment, arithmetic, relational, logical, bitwise, compound assignment, conditional and type comparison operators.
Bitwise  operators are: bitwise AND, bitwise OR, bitwise exclusive or,etc..
 

  1. What is an object? How if created?

ans:  An entity that has state and behavior is known as an object e.g., chair, bike, marker, pen, table, car, etc. It can be physical or logical (tangible and intangible). The example of an intangible object is the banking system.
A class provides the blueprints for objects. So basically, an object is created from a class. In Java, the new keyword is used to create new objects.
There are three steps when creating an object from a class −

  • Declaration − A variable declaration with a variable name with an object type.
  • Instantiation − The ‘new’ keyword is used to create the object.
  • Initialization − The ‘new’ keyword is followed by a call to a constructor. This call initializes the new object.
  1. Define constructor. Why it is needed?

constructor  is a method in a class that is executed automatically when object are created. constructor name is same as class name and it doesnot have any return type (even void).
 

  1. what is the difference between public and private access specifier?

public: public method or variable can be accessible  from anywhere.  we can access them inside the class,outside the class and in child class.
private: method or property with private visibility can only be accessible in side a class . we cannot access private method or variable outside the class.  

  1. what is the use of final keywords?

Final keyword is used to initialized the variable at the time of declaration. Final keyword makes a variable constant.eg: final double PI=3.145

  1. why is java a robust language?

java is robust because of its different features that make the program complete.for eg: java is strictly typed language it check the code both at complied time and run time and also have automatic garbage collection.