Answer:
The method in Java is as follows:
public static String returnlen(String input){
String output = ""+input.charAt(0)+input.charAt(input.length()-1);
return output;
}
Explanation:
This defines the method
public static String returnlen(String input){
This concatenates the first and the last character of the input string
String output = ""+input.charAt(0)+input.charAt(input.length()-1);
This returns the concatenated string
return output;
}
Answer:
False
Explanation:
This is a false statement. The ArrayList class can be sorted using a variety of different Sorting Algorithms just like a simple Array. Some programming languages have built-in functions for ArrayLists that automatically sort the ArrayList. The main difference between is that a simple Array is static, meaning that it has a predefined amount of elements while an ArrayList is dynamic meaning that elements can be added and removed at will.
Answer:
Customer Table
- Customer name
- Customer id
Product Table
- Product id/number (primary key, auto increment)
- Product name
- Product sale price
Transactions Table
- Transaction Id
- Customer Id
- Product id
- Quantity
- Price
- Date
Explanation:
Natalie wants to fetch following information from database
- Look up customer name and sale price
- Sort items in db by product number
To lookup customer name and sale price perform a join on Transactions table and Customer table.Assuming database is build in mysql the query to fetch required results would be
select transction.productId,transaction.customerid,customer.customername from transactions join customer ON
customer.customerid=transcation.customerid
where productid="user provided product id of returned product"
For sorting products by number set produc number in product table a auto increment primary key
Answer:
Option C, Disaster recovery plan
Explanation:
The seven domains of IT are
User Domain
System/Application Domain
LAN Domain
Remote Access Domain
WAN Domain
LAN-to-WAN Domain
Workstation Domain
To these seven domain, the Disaster recovery plan only applies to the LAN-to-WAN Domain as it is vulnerable to corruption of data and information and data. Also, it has insecure Transmission Control Protocol/Internet Protocol. (TCP/IP) applications and it at the radar of Hackers and attackers
Answer:
ring network
Explanation:
In a ring network, the nodes are arranged in a circular pattern where each node is connected to two adjacent nodes. In this topology, any node can communicate with any other node via the intermediaries.
In comparison,
- in a star network every communication needs to pass through a central hub node
- in a bus, each node is connected to a shared linear communication bus.
- in a hierarchical network nodes are organized along a tree structure layout.